Re: Suggestion about logging only every n-th statement

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: vygen(at)kicktipp(dot)de, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Suggestion about logging only every n-th statement
Date: 2018-06-20 12:53:13
Message-ID: CAEzk6ffqPUcdQb6SVMkE2ROEJ-SyYg+zKroDV-RGG54S4iuixw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 20 Jun 2018 at 12:51, Janning Vygen <vygen(at)kicktipp(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrien NAYRAT 2018-06-20 12:53:40 Re: Suggestion about logging only every n-th statement
Previous Message Łukasz Jarych 2018-06-20 12:43:16 Using DSN Connection and knowing windows username