Re: Disallow setting client_min_messages > ERROR?

From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: andres(at)anarazel(dot)de, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Disallow setting client_min_messages > ERROR?
Date: 2018-11-08 16:09:19
Message-ID: CADUqk8VJDMW+rBWrPhUdqRpdMoJNZuU6ghGkV=kyadq5=3ePQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 8, 2018 at 10:56 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> 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.
>

Agreed.

> 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?
>

My patch used the check hook, but works either way.

--
Jonah H. Harris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-11-08 16:30:18 Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation
Previous Message Andres Freund 2018-11-08 16:06:30 Re: Disallow setting client_min_messages > ERROR?