Re: Log a sample of transactions

Adrien Nayrat <adrien.nayrat@anayrat.info>

From: Adrien NAYRAT <adrien.nayrat@anayrat.info>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, "PostgreSQL mailing lists" <pgsql-hackers@postgresql.org>, Nikolay Samokhvalov <samokhvalov@gmail.com>
Date: 2019-01-17T10:30:01Z
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. Tweak docs for log_statement_sample_rate

Attachments

On 1/16/19 10:09 AM, Masahiko Sawada wrote:
> Since we set xact_is_sampled only when transaction starts and see it
> during transaction we cannot disable logging during transaction and
> vice versa. I can imagine the use case where user wants to disable
> logging during transaction. So it might be better to also check if
> log_xact_sample_rate > 0 in check_log_duration().

I Agree, here is third patch.

Thanks!