Re: Log statement sample - take two

Adrien Nayrat <adrien.nayrat@anayrat.info>

From: Adrien Nayrat <adrien.nayrat@anayrat.info>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-11-04T16:26:40Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Allow sampling of statements depending on duration

  2. Revert "Add log_statement_sample_rate parameter"

  3. Log all statements from a sample of transactions

On 11/4/19 2:08 AM, Tomas Vondra wrote:
> 
> Seems fine to me, mostly. I think the docs should explain how
> log_min_duration_statement interacts with log_min_duration_sample.
> Attached is a patch doing that, by adding one para to each GUC, along
> with some minor rewordings. I think the docs are mixing "sampling"
> vs. "logging" and "durations" vs. "statements" not sure.

Thanks for the rewording, it's clearer now.

> 
> I also think the two new sampling GUCs (log_min_duration_sample and
> log_statement_sample_rate) should be next to each other. We're not
> ordering the GUCs alphabetically anyway.

+1

> 
> I plan to make those changes and push in a couple days.
> 

Thanks!