Обсуждение: [HACKERS] feature wish: filter log_min_duration_statement according to thecontext (parse|bind|execute|...)

Поиск
Список
Период
Сортировка

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

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