From: | Andreas Kretschmer <andreas(at)a-kretschmer(dot)de> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org,Janning Vygen <vygen(at)kicktipp(dot)de> |
Subject: | Re: Suggestion about logging only every n-th statement |
Date: | 2018-06-20 13:08:09 |
Message-ID: | B40F3F57-1A83-435F-8FAB-0E989A357A64@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 20 June 2018 13:51:25 CEST, Janning Vygen <vygen(at)kicktipp(dot)de> wrote:
>Back in 2009 I made a suggestion which is not implemented yet but would
>
>still be very valuable and easy to implement in my opinion (not for me
>as I am not speaking C):
>
>https://www.postgresql.org/message-id/flat/200903161426(dot)56662(dot)vygen%40kicktipp(dot)de#200903161426(dot)56662(dot)vygen(at)kicktipp(dot)de
>
>We still can't afford to log each and every statement as we have too
>many and we don't want to afford more disk performance/space. Therefore
>
>we log only statements slower than 50ms.
>
>But for analyzing usage patterns it would be very nice to have this
>combined with a sample_rate for logging.
>
> logging_sample_rate = n
>
>So each n-th statement will get logged regardless of execution time.
>
>What do you think?
>
>regards
>Janning
I would suggest using of pg_stat_statements for that.
Regards, Andreas
--
2ndQuadrant - The PostgreSQL Support Company
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2018-06-20 13:34:37 | Re: Using DSN Connection and knowing windows username |
Previous Message | Janning Vygen | 2018-06-20 13:06:13 | Re: Suggestion about logging only every n-th statement |