summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-04-03 18:43:59 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-04-03 18:43:59 -0300
commit799e220346f1387e823a4dbdc3b1c8c3cdc5c3e0 (patch)
tree3530d9162d2069475148fdb0db5218b1e1c02b4b /doc/src
parentd8c0bd9fefa9c70a3f5613fba672fa92f08ea940 (diff)
Log all statements from a sample of transactions
This is useful to obtain a view of the different transaction types in an application, regardless of the durations of the statements each runs. Author: Adrien Nayrat Reviewed-by: Masahiko Sawada, Hayato Kuroda, Andres Freund
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 2166b99fc4e..915296310ce 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5871,6 +5871,32 @@ local0.* /var/log/postgresql
</listitem>
</varlistentry>
+ <varlistentry id="guc-log-transaction-sample-rate" xreflabel="log_transaction_sample_rate">
+ <term><varname>log_transaction_sample_rate</varname> (<type>real</type>)
+ <indexterm>
+ <primary><varname>log_transaction_sample_rate</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ 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 <literal>0</literal>, meaning not to log statements
+ from any additional transaction. Setting this to <literal>1</literal>
+ logs all statements for all transactions.
+ <varname>log_transaction_sample_rate</varname> is helpful to track a
+ sample of transaction.
+ </para>
+ <note>
+ <para>
+ Like all statement-logging options, this option can add significant
+ overhead.
+ </para>
+ </note>
+ </listitem>
+ </varlistentry>
+
</variablelist>
<para>