quick english patch

Started by Larry Rosenmanover 25 years ago6 messageshackers
Jump to latest
#1Larry Rosenman
ler@lerctr.org

Fix some english issues...
I also note some "interesting" (from an English perspective) #define
names that mayhaps need to be looked at.

Index: xlog.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/access/transam/xlog.c,v
retrieving revision 1.31
diff -c -r1.31 xlog.c
*** xlog.c	2000/11/21 10:17:57	1.31
--- xlog.c	2000/11/21 13:12:49
***************
*** 1426,1432 ****
  			 ControlFile->catalog_version_no, CATALOG_VERSION_NO);
  	if (ControlFile->state == DB_SHUTDOWNED)
! 		elog(LOG, "Data Base System was shutted down at %s",
  			 str_time(ControlFile->time));
  	else if (ControlFile->state == DB_SHUTDOWNING)
  		elog(LOG, "Data Base System was interrupted when shutting down at %s",
--- 1426,1432 ----
  			 ControlFile->catalog_version_no, CATALOG_VERSION_NO);

if (ControlFile->state == DB_SHUTDOWNED)
! elog(LOG, "Data Base System was shutdown at %s",
str_time(ControlFile->time));
else if (ControlFile->state == DB_SHUTDOWNING)
elog(LOG, "Data Base System was interrupted when shutting down at %s",
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#2Larry Rosenman
ler@lerctr.org
In reply to: Larry Rosenman (#1)
Re: quick english patch

Want me to do a new patch, or will you fix mine?

LER

* Peter Eisentraut <peter_e@gmx.net> [001121 11:51]:

Larry Rosenman writes:

--- 1426,1432 ----
ControlFile->catalog_version_no, CATALOG_VERSION_NO);

if (ControlFile->state == DB_SHUTDOWNED)
! elog(LOG, "Data Base System was shutdown at %s",

shut down (two words)

str_time(ControlFile->time));
else if (ControlFile->state == DB_SHUTDOWNING)
elog(LOG, "Data Base System was interrupted when shutting down at %s",

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Larry Rosenman (#1)
Re: quick english patch

Larry Rosenman writes:

--- 1426,1432 ----
ControlFile->catalog_version_no, CATALOG_VERSION_NO);

if (ControlFile->state == DB_SHUTDOWNED)
! elog(LOG, "Data Base System was shutdown at %s",

shut down (two words)

str_time(ControlFile->time));
else if (ControlFile->state == DB_SHUTDOWNING)
elog(LOG, "Data Base System was interrupted when shutting down at %s",

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Larry Rosenman (#2)
Re: quick english patch

Larry Rosenman writes:

Want me to do a new patch, or will you fix mine?

I'll fix all these things. I'm also somewhat annoyed that these messages
show up during initdb now. Anyone know why exactly? I couldn't trace it
down.

LER

* Peter Eisentraut <peter_e@gmx.net> [001121 11:51]:

Larry Rosenman writes:

--- 1426,1432 ----
ControlFile->catalog_version_no, CATALOG_VERSION_NO);

if (ControlFile->state == DB_SHUTDOWNED)
! elog(LOG, "Data Base System was shutdown at %s",

shut down (two words)

str_time(ControlFile->time));
else if (ControlFile->state == DB_SHUTDOWNING)
elog(LOG, "Data Base System was interrupted when shutting down at %s",

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#4)
Talkative initdb, elog message levels

Peter Eisentraut <peter_e@gmx.net> writes:

I'm also somewhat annoyed that these messages show up during initdb
now. Anyone know why exactly? I couldn't trace it down.

I assume you're talking about this DEBUG stuff:

...
Creating directory /home/postgres/testversion/data/pg_xlog
Creating template1 database in /home/postgres/testversion/data/base/1
DEBUG: starting up
DEBUG: database system was shut down at 2000-11-22 14:38:01
DEBUG: CheckPoint record at (0, 8)
DEBUG: Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
DEBUG: NextTransactionId: 514; NextOid: 16384
DEBUG: database system is in production state
Creating global relations in /home/postgres/testversion/data/global
DEBUG: starting up
DEBUG: database system was shut down at 2000-11-22 14:38:09
DEBUG: CheckPoint record at (0, 96)
DEBUG: Redo record at (0, 96); Undo record at (0, 0); Shutdown TRUE
DEBUG: NextTransactionId: 514; NextOid: 17199
DEBUG: database system is in production state
Initializing pg_shadow.
Enabling unlimited row width for system tables.
...

AFAICT, it's always been true that elog(DEBUG) will write to stderr,
and initdb does not redirect the backend's stderr. The change is that
with XLOG enabled, there is now code that will do elog(DEBUG) in the
default path of control during initdb's bootstrap processing.
Specifically, all this chatter is coming out of StartupXLOG() in xlog.c.
Evidently, up to now there were no elog(DEBUG) calls encountered during
a normal bootstrap run.

Not sure whether we should change any code or not. I don't much like
the idea of having initdb send stderr to /dev/null, for example.
Perhaps StartupXLOG could be made a little less chatty, however?

BTW, Vadim, what is the reasoning for your having invented aliases
STOP and LOG for elog levels REALLYFATAL and DEBUG? I think it's
confusing to have more than one name for the same severity level.
If we're going to open up the issue of renaming the elog levels to
something saner, there are a whole bunch of changes to be undertaken,
and these aren't the names I'd choose anyway ...

regards, tom lane

#6Mikheev, Vadim
vmikheev@SECTORBASE.COM
In reply to: Tom Lane (#5)
RE: Talkative initdb, elog message levels

I assume you're talking about this DEBUG stuff:

...
Creating directory /home/postgres/testversion/data/pg_xlog
Creating template1 database in /home/postgres/testversion/data/base/1
DEBUG: starting up
DEBUG: database system was shut down at 2000-11-22 14:38:01

I had to add StartupXLOG call when bootstraping to handle OIDs
correctly.

Not sure whether we should change any code or not. I don't much like
the idea of having initdb send stderr to /dev/null, for example.
Perhaps StartupXLOG could be made a little less chatty, however?

I considered messages during database system startup/shutdown as having
higher interest/priority than regular debug messages. Some if()
wouldn't be bad, probably.

BTW, Vadim, what is the reasoning for your having invented aliases
STOP and LOG for elog levels REALLYFATAL and DEBUG? I think it's
confusing to have more than one name for the same severity level.
If we're going to open up the issue of renaming the elog levels to
something saner, there are a whole bunch of changes to be undertaken,
and these aren't the names I'd choose anyway ...

Well, as stated above I would think about XLOG (maybe some others?)
messages as about something different from debug ones. Look at syslog -
there are NOTICE & INFO logging levels, not just DEBUG.

As for STOP - there was no REALLYFATAL at the time I started XLOG codding
(> year ago)... Anyway, I like STOP more than REALLYFATAL -:) But wouldn't
insist on this name.

Vadim