Thread: quick english patch

quick english patch

From
Larry Rosenman
Date:
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


Re: quick english patch

From
Peter Eisentraut
Date:
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/



Re: quick english patch

From
Larry Rosenman
Date:
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


Re: quick english patch

From
Peter Eisentraut
Date:
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/



Talkative initdb, elog message levels

From
Tom Lane
Date:
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