Re: Disallow setting client_min_messages > ERROR?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Disallow setting client_min_messages > ERROR?
Дата
Msg-id 21894.1541692593@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Disallow setting client_min_messages > ERROR?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Disallow setting client_min_messages > ERROR?  (Andres Freund <andres@anarazel.de>)
Re: Disallow setting client_min_messages > ERROR?  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-11-06 11:37:40 -0500, Tom Lane wrote:
>> Andres Freund <andres@anarazel.de> writes:
>>> Seems reasonable. I do think it's probably sensible to backpatch,
>>> although I wonder if we shouldn't clamp the value to ERROR at log
>>> emission error time, rather than via guc.c, so we don't prevent old code
>>> / postgresql.conf that set client_min_messages to > ERROR.

>> Hm, do you really think there is any?

> I'm not sure. But it sounds like it'd possibly slow adoption of the
> minor releases if we said "hey, make sure that you nowhere set
> client_min_messages > ERROR", even if it's not particularly meaningful
> thing to do, as it'd still imply a fair bit of work for bigger
> applications with not great standards.

OK, so the consensus seems to be that the back branches should continue
to allow you to set client_min_messages = FATAL/PANIC, but then ignore
that and act as though it were ERROR.

We could implement the clamp either in elog.c or in a GUC assignment
hook.  If we do the latter, then SHOW and pg_settings would report the
effective value rather than what you set.  That seems a bit cleaner
to me, and not without precedent.  As far as the backwards compatibility
angle goes, you can invent scenarios in which either choice could be
argued to break something; but I think the most likely avenue for
trouble is if the visible setting doesn't match the actual behavior.
So I'm leaning to the assign-hook approach; comments?

            regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Disallow setting client_min_messages > ERROR?