Understanding 'log_transaction_sample_rate'

From: Raj kumar <rajkumar820999(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Understanding 'log_transaction_sample_rate'
Date: 2020-05-27 12:44:39
Message-ID: CACxU--VmTCMXK6AJZtdLA3vRPdfX5ygSnmhnKkv3t4ugoC7TvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi all,
If I set the value of parameter *'log_transaction_sample_rate' as 0.7,* how
does it do the logging? Say I am running 10 transactions with 5 query
each. *How
frequently the logging will happen on the basis of the above parameter.*
Let's ignore the other logging parameter settings.
Details from official documentation,log_transaction_sample_rate (real)

Set the fraction of transactions whose statements are all logged, in
addition to statements logged for other reasons. It applies to each new
transaction regardless of its statements' durations. The default is 0,
meaning not to log statements from any additional transaction. Setting this
to 1 logs all statements for all transactions. log_transaction_sample_rate is
helpful to track a sample of transaction. Only superusers can change this
setting.

Thanks,

Raj

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2020-05-27 15:26:49 Re: Restricting access to SHOW/SET
Previous Message Mats Julian Olsen 2020-05-27 09:35:17 Restricting access to SHOW/SET