Re: idea: log_statement_sample_rate - bottom limit for sampling - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: idea: log_statement_sample_rate - bottom limit for sampling
Date
Msg-id CAFj8pRAVCaB601vRLOrjPc-MukiG1EdLuB2P4MUxqP-ZSFVjDg@mail.gmail.com
Whole thread Raw
In response to Re: idea: log_statement_sample_rate - bottom limit for sampling  (Gilles Darold <gilles@darold.net>)
Responses Re: idea: log_statement_sample_rate - bottom limit for sampling  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Hi

čt 6. 6. 2019 v 10:48 odesílatel Gilles Darold <gilles@darold.net> napsal:
Le 06/06/2019 à 10:38, Pavel Stehule a écrit :
> Hi
>
> I like the idea of sampling slow statements via 
> log_statement_sample_rate. But I miss some parameter that can ensure
> so every query executed over this limit is logged.
>
> Can we introduce new option
>
> log_statement_sampling_limit
>
> The query with execution time over this limit is logged every time.
>
> What do you think about this?
>
> Regards
>
> Pavel


+1, log_min_duration_statement is modulated by log_statement_sample_rate
that mean that there is no more way to log all statements over a certain
duration limit. log_statement_sampling_limit might probably always be
upper than log_min_duration_statement.

Here is a patch

Regards

Pavel



--
Gilles Darold
http://www.darold.net/

Attachment

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: SQL/JSON path issues/questions
Next
From: Chapman Flack
Date:
Subject: Re: SQL/JSON path issues/questions