From: Geoff Winkless <pgsqladmin@geoff.dj>
To: vygen@kicktipp.de
To: pgsql-general@lists.postgresql.org
Subject: Re: Suggestion about logging only every n-th statement
Date: Wed, 20 Jun 2018 13:53:13 +0100
Message-ID: <CAEzk6ffqPUcdQb6SVMkE2ROEJ-SyYg+zKroDV-RGG54S4iuixw@mail.gmail.com> (raw)
In-Reply-To: <c9d37330-5aa6-2793-af35-f32a19fe8c58@kicktipp.de>
References: <c9d37330-5aa6-2793-af35-f32a19fe8c58@kicktipp.de>
On Wed, 20 Jun 2018 at 12:51, Janning Vygen <vygen@kicktipp.de> wrote:
> But for analyzing usage patterns it would be very nice to have this
> combined with a sample_rate for logging.
>
> logging_sample_rate = n
>
> So each n-th statement will get logged regardless of execution time.
>
I think you would need to introduce a randomizing element if you wanted to
make it statistically valid. Logging every n'th statement could (depending
on your usage pattern) be catastrophically inaccurate.
Geoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: pgsqladmin@geoff.dj, vygen@kicktipp.de
Subject: Re: Suggestion about logging only every n-th statement
In-Reply-To: <CAEzk6ffqPUcdQb6SVMkE2ROEJ-SyYg+zKroDV-RGG54S4iuixw@mail.gmail.com>
References: <c9d37330-5aa6-2793-af35-f32a19fe8c58@kicktipp.de> <CAEzk6ffqPUcdQb6SVMkE2ROEJ-SyYg+zKroDV-RGG54S4iuixw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox