Disallow setting client_min_messages > ERROR?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Disallow setting client_min_messages > ERROR?
Date: 2018-11-06 16:19:40
Message-ID: 7809.1541521180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

There's a thread on the ODBC list[1] complaining about the fact that
it's possible to set client_min_messages to FATAL or PANIC, because
that makes ODBC misbehave. This is not terribly surprising, because
doing so arguably breaks the frontend protocol. The simple-query
section says this:

In the event of an error, ErrorResponse is issued followed by

and the extended-query section says this:

Therefore, an Execute phase is always terminated by the appearance of
exactly one of these messages: CommandComplete, EmptyQueryResponse (if
the portal was created from an empty query string), ErrorResponse, or

and both of those are lies if an ERROR response gets suppressed thanks to
client_min_messages being set too high. It seems that libpq+psql manages
to survive the case (probably because psql is too stupid to notice that
anything is wrong), but I don't find it unreasonable that other clients
get hopelessly confused.

Hence, I propose that we should disallow setting client_min_messages
any higher than ERROR, and that this probably even amounts to a
back-patchable bug fix.


regards, tom lane

[1] https://www.postgresql.org/message-id/flat/EE586BE92A4AFB45B03310C2A0C0565D6D0EFC17%40G01JPEXMBKW03


Browse pgsql-hackers by date

  From Date Subject
Next Message REIX, Tony 2018-11-06 16:26:26 Issue with v11.0 within jsonb_plperl tests in 32bit on AIX
Previous Message Tomas Vondra 2018-11-06 15:48:36 Re: jsonpath