Re: Disallow setting client_min_messages > ERROR? - Mailing list pgsql-hackers

From Jonah H. Harris
Subject Re: Disallow setting client_min_messages > ERROR?
Date
Msg-id CADUqk8VJDMW+rBWrPhUdqRpdMoJNZuU6ghGkV=kyadq5=3ePQg@mail.gmail.com
Whole thread Raw
In response to Re: Disallow setting client_min_messages > ERROR?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Disallow setting client_min_messages > ERROR?
List pgsql-hackers
On Thu, Nov 8, 2018 at 10:56 AM Tom Lane <tgl@sss.pgh.pa.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

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Disallow setting client_min_messages > ERROR?
Next
From: Amit Langote
Date:
Subject: Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation