Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Log a warning instead of shutting down the system if we can't

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org, Selena Deckelmann <selena(at)endpoint(dot)com>
Subject: Re: pgsql: Log a warning instead of shutting down the system if we can't
Date: 2009-03-04 18:39:53
Message-ID: 4719.1236191993@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committers
Magnus Hagander <magnus(at)hagander(dot)net> writes:
> Tom Lane wrote:
>> This should be elog(LOG), not elog(WARNING).  Compare the treatment
>> of syntax errors within the file.

> While I can agree that they should be the same, why should they not be
> WARNING?

Because the postmaster has no client to receive a WARNING, and the log
message level is likely to be such that a WARNING won't get there
either.  Furthermore, if there are any live backends that might chance
to issue this message, having it pop up as a WARNING seems more likely
to be confusing than helpful, since it'll be unrelated to whatever SQL
command they are doing.

In general, LOG elevel should be used for background-type problems,
which is what this is.

			regards, tom lane

In response to

pgsql-committers by date

Next:From: Magnus HaganderDate: 2009-03-04 18:43:38
Subject: pgsql: Change hba load failure message to LOG instead of WARNING.
Previous:From: Magnus HaganderDate: 2009-03-04 18:15:59
Subject: Re: pgsql: Log a warning instead of shutting down the system if we can't

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group