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

From Bruce Momjian
Subject Re: elog() patch
Date
Msg-id 200203041932.g24JWP725366@candle.pha.pa.us
Whole thread Raw
In response to Re: elog() patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I will add a new symbol INFOFORCE which will always be sent to the
> > client no matter what the client_min_messages level.
> 
> I was thinking along the same lines, but I hate that name.
> INFOALWAYS maybe?
> 
> Also, should it be different from INFO as far as the server log
> goes?  Not sure.

In going over the existing INFO messages, I now see that there are
several places that must send messages to the client no matter what
client_min_messages is set to.  The areas are EXPLAIN, VACUUM, ANALYZE,
SHOW, and various "unsuported" messages.

So, I am now thinking that INFOALWAYS is not the proper way to handle
these cases.  While I saw no value in splitting the current NOTICE
messagees into WARNING and NOTICE (they all seem pretty much the same),
I now see a value in splitting INFO into INFO for "always to client" and
NOTICE which will be things like automatic sequence creation.

So, based on current CVS, NOTICE -> WARNING, and some INFO will be
changed to NOTICE and remaining INFO will always be sent to the client.

If I don't create a new tag, then people who set the client_min_messages
to ERROR will be confused to see INFO messages in some cases and not
others.  In the final code, client_min_messages will not have an INFO
level option because INFO will always go to the client. 
server_min_messages will have an INFO option.

Comments?

--  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: Tom Lane
Date:
Subject: Uniqueness of rule, constraint, and trigger names
Next
From: "Hannu Krosing"
Date:
Subject: Re: Oracle vs PostgreSQL in real life