diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-03-30 10:10:32 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-03-30 10:20:37 +0300 |
commit | 754baa21f723255272c24dc5f9ab456858e361e3 (patch) | |
tree | fb2b3c4abb71fd3d0786f3b67c931820b386cf7f /doc/src | |
parent | bc03c5937d103952ef4f40a3fa4514c154538d25 (diff) | |
download | postgresql-754baa21f723255272c24dc5f9ab456858e361e3.tar.gz postgresql-754baa21f723255272c24dc5f9ab456858e361e3.zip |
Automatically terminate replication connections that are idle for more
than replication_timeout (a new GUC) milliseconds. The TCP timeout is often
too long, you want the master to notice a dead connection much sooner.
People complained about that in 9.0 too, but with synchronous replication
it's even more important to notice dead connections promptly.
Fujii Masao and Heikki Linnakangas
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index e0ebee63ea5..217e4e781de 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2019,6 +2019,29 @@ SET ENABLE_SEQSCAN TO OFF; </para> </listitem> </varlistentry> + + <varlistentry id="guc-replication-timeout" xreflabel="replication_timeout"> + <term><varname>replication_timeout</varname> (<type>integer</type>)</term> + <indexterm> + <primary><varname>replication_timeout</> configuration parameter</primary> + </indexterm> + <listitem> + <para> + Terminate replication connections that are inactive longer + than the specified number of milliseconds. This is useful for + the primary server to detect a standby crash or network outage. + A value of zero means wait forever. This parameter can only be set in + the <filename>postgresql.conf</> file or on the server command line. + The default value is 60 seconds. + </para> + <para> + To prevent connections from being terminated prematurely, + <xref linkend="guc-wal-receiver-status-interval"> + must be enabled on the standby, and its value must be less than the + value of <varname>replication_timeout</>. + </para> + </listitem> + </varlistentry> </variablelist> </sect2> @@ -2216,6 +2239,11 @@ SET ENABLE_SEQSCAN TO OFF; the <filename>postgresql.conf</> file or on the server command line. The default value is 10 seconds. </para> + <para> + When <xref linkend="guc-replication-timeout"> is enabled on the primary, + <varname>wal_receiver_status_interval</> must be enabled, and its value + must be less than the value of <varname>replication_timeout</>. + </para> </listitem> </varlistentry> |