Re: idea: log_statement_sample_rate - bottom limit for sampling

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Gilles Darold <gilles(at)darold(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: idea: log_statement_sample_rate - bottom limit for sampling
Date: 2019-06-18 03:30:38
Message-ID: CAFj8pRAzzjmwpzzs0qg+9whUErt3-fbyy-n7gnK+-fP_Vxje9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

po 17. 6. 2019 v 22:40 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:

> Hi
>
> čt 6. 6. 2019 v 10:48 odesílatel Gilles Darold <gilles(at)darold(dot)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
>

I did error in logic - fixed

> Regards
>
> Pavel
>
>
>>
>> --
>> Gilles Darold
>> http://www.darold.net/
>>
>>

Attachment Content-Type Size
log_statement_sample_limit-2.patch text/x-patch 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-06-18 04:32:17 Re: PG 12 beta 1 segfault during analyze
Previous Message Steve Singer 2019-06-18 01:46:02 Re: PG 12 beta 1 segfault during analyze