Re: log_statement = 'mod' does not log all data modifying statements

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: log_statement = 'mod' does not log all data modifying statements
Дата
Msg-id 20150909141705.GC3685@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: log_statement = 'mod' does not log all data modifying statements  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: log_statement = 'mod' does not log all data modifying statements
Список pgsql-general
* Bruce Momjian (bruce@momjian.us) wrote:
> On Fri, Jun 12, 2015 at 01:54:30PM -0500, Jack Christensen wrote:
> > I was recently surprised by changes that were not logged by
> > log_statement = 'mod'. After changing log_statement to 'all', I
> > found that the changes were occurring in a writable CTE.
> >
> > Is there a way to log all statements that update data?
>
> Not really.  Is this something we should document better?

pg_audit handles this (it is one of the specific goals of that project,
in fact) and the case where modifications are done inside of DO blocks
and PL code.  Further, it provides a great deal of additional
flexibility.

What we need here is better logging/auditing capabilities in core.
Improving the documentation for the back-branches is good but doesn't
address this use-case.  It's unfortunate that we don't have a better
answer at this time.

Thanks!

Stephen

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: log_statement = 'mod' does not log all data modifying statements
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: jsonb value retrieval performance