Re: [PROPOSAL] Client Log Output Filtering

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [PROPOSAL] Client Log Output Filtering
Дата
Msg-id 56E1A981.5080702@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [PROPOSAL] Client Log Output Filtering  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 10/03/16 17:07, Tom Lane wrote:
> Petr Jelinek <petr@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



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Add generate_series(date,date) and generate_series(date,date,integer)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Optimizer questions