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

From Tom Lane
Subject Re: idea: log_statement_sample_rate - bottom limit for sampling
Date
Msg-id 27954.1564950312@sss.pgh.pa.us
Whole thread Raw
In response to Re: idea: log_statement_sample_rate - bottom limit for sampling  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: idea: log_statement_sample_rate - bottom limit for sampling  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> On Sun, Aug 04, 2019 at 03:16:12PM -0400, Tom Lane wrote:
>> Isn't the issue here the interaction between log_transaction_sample_rate
>> and log_min_duration_statement?

> No, that interaction only affects statement-level sampling.

OK, I was confusing the features.

> For transaction-level sampling we do the sampling independently of the
> statement duration, i.e. we when starting a transaction we determine
> whether the whole transaction will be sampled. It has nothing to do with
> the proposed log_statement_sample_limit.

So, to clarify: our plan is that a given statement will be logged
if any of these various partial-logging features says to do so?

(And the knock on HEAD's behavior is exactly that it breaks that
independence for log_min_duration_statement.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: idea: log_statement_sample_rate - bottom limit for sampling
Next
From: Tomas Vondra
Date:
Subject: Re: idea: log_statement_sample_rate - bottom limit for sampling