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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Log a warning instead of shutting down the system if we can't
Дата
Msg-id 4719.1236191993@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Log a warning instead of shutting down the system if we can't  (mha@postgresql.org (Magnus Hagander))
Список pgsql-committers
Magnus Hagander <magnus@hagander.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

В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Log a warning instead of shutting down the system if we can't
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: pgsql: Log a warning instead of shutting down the system if we can't