On 10/03/16 17:07, Tom Lane wrote:
Petr Jelinek <p...@2ndquadrant.com> writes:
The comment above errhidefromclient says "Only log levels below ERROR
can be hidden from the client." but use of the errhidefromclient(true)
actually does hide the error message from client, client just gets
failed query without any message when used with ERROR level.

Um.  That seems pretty broken --- I think it's a violation of the wire
protocol spec.

I was thinking that as well. The doc says that on error the ErrorResponse is sent and connection is closed and we clearly fail to send the ErrorResponse in this case.

I notice though that we allow client_min_messages to be set to FATAL,
which would be a different way of violating the protocol.  Maybe we
should reduce the max setting of that to ERROR?

Hmm yeah that seems to be that way for very long time though so I wonder if that's intentional although it's also against protocol spec then. In any case I would be in favor of lowering the max setting to ERROR.

For the patch at hand, it should be sufficient for errhidefromclient() to check that the edata->elevel is lower than ERROR.

  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to