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

Started by Marc Maminover 8 years ago2 messages
#1Marc Mamin
M.Mamin@intershop.de

Hello,
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.

best regards,

Marc Mamin

#2Stephen Frost
sfrost@snowman.net
In reply to: Marc Mamin (#1)
Re: feature wish: filter log_min_duration_statement according to the context (parse|bind|execute|...)

Greetings,

* Marc Mamin (M.Mamin@intershop.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