aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2021-01-08 00:47:03 +0900
committerFujii Masao <fujii@postgresql.org>2021-01-08 00:47:03 +0900
commit0650ff23038bc3eb8d8fd851744db837d921e285 (patch)
tree1df2b5ccd7a20ee538c93339b115ca4f274a5aa6 /doc/src
parentf7a1a805cb178653ea2a6c8991ad73b035af953e (diff)
downloadpostgresql-0650ff23038bc3eb8d8fd851744db837d921e285.tar.gz
postgresql-0650ff23038bc3eb8d8fd851744db837d921e285.zip
Add GUC to log long wait times on recovery conflicts.
This commit adds GUC log_recovery_conflict_waits that controls whether a log message is produced when the startup process is waiting longer than deadlock_timeout for recovery conflicts. This is useful in determining if recovery conflicts prevent the recovery from applying WAL. Note that currently a log message is produced only when recovery conflict has not been resolved yet even after deadlock_timeout passes, i.e., only when the startup process is still waiting for recovery conflict even after deadlock_timeout. Author: Bertrand Drouvot, Masahiko Sawada Reviewed-by: Alvaro Herrera, Kyotaro Horiguchi, Fujii Masao Discussion: https://postgr.es/m/9a60178c-a853-1440-2cdc-c3af916cff59@amazon.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml22
-rw-r--r--doc/src/sgml/high-availability.sgml6
2 files changed, 28 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 15b94c96c08..7c0a673a8dd 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -6952,6 +6952,28 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
</listitem>
</varlistentry>
+ <varlistentry id="guc-log-recovery-conflict-waits" xreflabel="log_recovery_conflict_waits">
+ <term><varname>log_recovery_conflict_waits</varname> (<type>boolean</type>)
+ <indexterm>
+ <primary><varname>log_recovery_conflict_waits</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Controls whether a log message is produced when the startup process
+ is waiting longer than <varname>deadlock_timeout</varname>
+ for recovery conflicts. This is useful in determining if recovery
+ conflicts prevent the recovery from applying WAL.
+ </para>
+
+ <para>
+ The default is <literal>off</literal>. This parameter can only be set
+ in the <filename>postgresql.conf</filename> file or on the server
+ command line.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="guc-log-parameter-max-length" xreflabel="log_parameter_max_length">
<term><varname>log_parameter_max_length</varname> (<type>integer</type>)
<indexterm>
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 04f75020e44..efc382cb8d2 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -2071,6 +2071,12 @@ if (!triggered)
server. The <structname>pg_stat_database</structname> system view also contains
summary information.
</para>
+
+ <para>
+ Users can control whether a log message is produced when WAL replay is waiting
+ longer than <varname>deadlock_timeout</varname> for conflicts. This
+ is controlled by the <xref linkend="guc-log-recovery-conflict-waits"/> parameter.
+ </para>
</sect2>
<sect2 id="hot-standby-admin">