Re: elog() patch - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: elog() patch
Date
Msg-id 200203011815.g21IFXn17589@candle.pha.pa.us
Whole thread Raw
In response to Re: elog() patch  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
List pgsql-hackers
Zeugswetter Andreas SB SD wrote:
> 
> > Actually, an interesting idea would be to leave NOTICE alone and make
> > the more serious messages WARNING.  The problem with that is I think
> > INFO is clearer as something for client/user, and LOG something for the
> > logs.  I don't think NOTICE has the same conotation.  I just thought I
> > would mention that possibility.
> > 
> > So, with WARNING, NOTICE would go away and become INFO or WARNING, and
> > DEBUG goes away to become DEBUG1-5.  With DEBUG gone, our need to add
> > PG_* to the beginning of the elog symbols may not be necessary.
> 
> Now I am verwirrt (== brain all knots) :-)
> 
> My take was to have WARNING and NOTICE, yours is WARNING and INFO ?
> For me INFO is also better to understand than NOTICE.
> Not sure that alone is worth the change though, since lots of 
> clients will currently parse "NOTICE".

OK, now that the current elog() patch seems to be OK with everyone, we
can discuss if we want to change the remaining non-INFO NOTICE messages
to WARNING.  Seems to more closely match the SQL standard.  All messages
will continue using the 'N' protocol type so this shouldn't be an issue.
I don't know any clients that parse the NOTICE: tag, but they are going
to have to change things for INFO: anyway so we might as well make the
change during 7.3 too.

Comments?

> I also like LOG, since I don't like the current NOTICES in the log.

Good, that was one of my goals.

> Imho INFO and WARNING would be nothing for the log per default.
> LOG would be things that are only of concern to the DBA.
> My preferred client level would prbbly be WARNING (no INFO).

Well, that is interesting.  Currently we would send WARNING/NOTICE to
the logs because it is an exceptional condition, though not as serious
as error.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: elog() patch
Next
From: Stephan Szabo
Date:
Subject: Re: Database Caching