Re: Suggestion about logging only every n-th statement

2018-06-24 Thread Adrien Nayrat
On 06/20/2018 03:06 PM, Janning Vygen wrote: >> FYI in made this patch which seems do what you want : >> https://www.postgresql.org/message-id/flat/c30ee535-ee1e-db9f-fa97-146b9f62caed%40anayrat.info#c30ee535-ee1e-db9f-fa97-146b9f62c...@anayrat.info >> >> >> I will add an entry in september's commi

Re: Suggestion about logging only every n-th statement

2018-06-20 Thread Adrien Nayrat
On 06/20/2018 03:08 PM, Andreas Kretschmer wrote: > I would suggest using of pg_stat_statements for that. I agree, but sometimes it is not sufficient. For example, if you need query's parameters. -- Adrien NAYRAT signature.asc Description: OpenPGP digital signature

Re: Suggestion about logging only every n-th statement

2018-06-20 Thread Andreas Kretschmer
On 20 June 2018 13:51:25 CEST, Janning Vygen 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.56662.vygen%4

Re: Suggestion about logging only every n-th statement

2018-06-20 Thread Janning Vygen
Am 20.06.2018 um 14:53 schrieb Adrien NAYRAT: On 06/20/2018 01:51 PM, Janning Vygen 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

Re: Suggestion about logging only every n-th statement

2018-06-20 Thread Adrien NAYRAT
On 06/20/2018 01:51 PM, Janning Vygen 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.56662.vygen%40kicktipp.de

Re: Suggestion about logging only every n-th statement

2018-06-20 Thread Geoff Winkless
On Wed, 20 Jun 2018 at 12:51, Janning Vygen wrote: > 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. > I think you would need to

Suggestion about logging only every n-th statement

2018-06-20 Thread Janning Vygen
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.56662.vygen%40kicktipp.de#200903161426.56662.vy...@kicktipp.de We stil