Re: feature wish: filter log_min_duration_statement according to the context (parse|bind|execute|...)

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Marc Mamin <M(dot)Mamin(at)intershop(dot)de>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: feature wish: filter log_min_duration_statement according to the context (parse|bind|execute|...)
Date: 2017-05-11 12:02:38
Message-ID: 20170511120238.GU3151@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Marc Mamin (M(dot)Mamin(at)intershop(dot)de) wrote:
> setting log_min_duration_statement to 0 is usefull on test or development system, but this may lead to huge log files.
> It would often be useful to discard the parse and bind entries.
> maybe a new parameter like "log_min_duration_execute"?
> I don't have the skills to implement this though.

You might take a look at pgAudit, which allows this kind of filtering
based on what objects are being accessed.

The other option is to look at pg_stat_statements.

In general, I agree that it'd be awful nice to have something like this
built into core.

Thanks!

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Khandekar 2017-05-11 12:11:24 Re: UPDATE of partition key
Previous Message Robert Haas 2017-05-11 11:57:14 Re: UPDATE of partition key