Re: New GUC to sample log queries

Dmitry Dolgov <9erthalion6@gmail.com>

From: Dmitry Dolgov <9erthalion6@gmail.com>
To: adrien.nayrat@anayrat.info
Cc: Vik Fearing <vik.fearing@2ndquadrant.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>, david.rowley@2ndquadrant.com, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-11-18T11:18:33Z
Lists: pgsql-hackers
> On Sun, 18 Nov 2018 at 10:52, Adrien Nayrat <adrien.nayrat@anayrat.info>
> wrote:
>
> For me, the question is how to name this GUC? Is "log_sample_rate" is enough?
> I am not sure because it is only related to queries logged by
> log_min_duration_statements.

Since it's hard to come up with a concise name that will mention sampling rate
in the context of min_duration_statement, I think it's fine to name this
configuration "log_sample_rate", as long as it's dependency from
log_min_duration_statements is clearly explained in the documentation.


Commits

  1. Use pg_strong_random() to select each server process's random seed.

  2. Use a separate random seed for SQL random()/setseed() functions.

  3. Marginal performance hacking in erand48.c.

  4. Fix latent problem with pg_jrand48().

  5. Silence compiler warning

  6. Add log_statement_sample_rate parameter