log bind parameter values on error

Поиск
Список
Период
Сортировка
От Alexey Bashtanov
Тема log bind parameter values on error
Дата
Msg-id 0146a67b-a22a-0519-9082-bc29756b93a2@imap.cc
обсуждение исходный текст
Ответы Re: log bind parameter values on error  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: log bind parameter values on error  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hello,

I'd like to propose a patch to log bind parameter values not only when 
logging duration,
but also on error (timeout in particular) or in whatever situation the 
statement normally gets logged.
This mostly could be useful when the request originator doesn't log them 
either, so it's hard
to reproduce the problem.

Unfortunately, when enabled, the feature comes with some memory and CPU 
overhead,
as we cannot convert certain values to text when in aborted transaction.

We potentially could do the trick with built-in types, but it would need 
cautious work with composite types,
and also require more computation on the logging stage, which is a risk 
of cascading errors.
Custom types still wouldn't be loggable, even as passed by client, which 
would be not great.

So I decided to cache textual representations on bind stage,
which is especially easy if the client uses text protocol.

Best,
   Alexey

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Variable-length FunctionCallInfoData
Следующее
От: David Steele
Дата:
Сообщение: Re: Add timeline to partial WAL segments