Re: New GUC to sample log queries

Thomas Munro <thomas.munro@enterprisedb.com>

From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Adrien Nayrat <adrien.nayrat@anayrat.info>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Tomas Vondra <tomas.vondra@2ndquadrant.com>, vik.fearing@2ndquadrant.com, Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>, David Rowley <david.rowley@2ndquadrant.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-11-25T23:40:21Z
Lists: pgsql-hackers
On Wed, Nov 21, 2018 at 9:06 PM Adrien Nayrat
<adrien.nayrat@anayrat.info> wrote:
> Thanks for your comments. Here is the updated patch. I fixed a warning for
> missing parentheses in this expression:
> if ((exceeded && in_sample) || log_duration)

Hi Adrien,

GCC 4.8 says:

guc.c:3328:3: error: initialization makes integer from pointer without
a cast [-Werror]
},
^
guc.c:3328:3: error: (near initialization for
‘ConfigureNamesReal[19].gen.flags’) [-Werror]

-- 
Thomas Munro
http://www.enterprisedb.com


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