aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-10-11 17:39:52 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-10-11 17:48:08 +0300
commit6f60fdd7015b032bf49273c99f80913d57eac284 (patch)
treeef9a5602c01617665815503a45dc1ea3b379e757 /doc/src
parent8521d131941be5a177270bc428fa8e684cd645b5 (diff)
downloadpostgresql-6f60fdd7015b032bf49273c99f80913d57eac284.tar.gz
postgresql-6f60fdd7015b032bf49273c99f80913d57eac284.zip
Improve replication connection timeouts.
Rename replication_timeout to wal_sender_timeout, and add a new setting called wal_receiver_timeout that does the same at the walreceiver side. There was previously no timeout in walreceiver, so if the network went down, for example, the walreceiver could take a long time to notice that the connection was lost. Now with the two settings, both sides of a replication connection will detect a broken connection similarly. It is no longer necessary to manually set wal_receiver_status_interval to a value smaller than the timeout. Both wal sender and receiver now automatically send a "ping" message if more than 1/2 of the configured timeout has elapsed, and it hasn't received any messages from the other end. Amit Kapila, heavily edited by me.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/config.sgml36
-rw-r--r--doc/src/sgml/release-9.1.sgml2
2 files changed, 23 insertions, 15 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 83884164305..b4fcbaf9c7d 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2236,10 +2236,10 @@ include 'filename'
</listitem>
</varlistentry>
- <varlistentry id="guc-replication-timeout" xreflabel="replication_timeout">
- <term><varname>replication_timeout</varname> (<type>integer</type>)</term>
+ <varlistentry id="guc-wal-sender-timeout" xreflabel="wal_sender_timeout">
+ <term><varname>wal_sender_timeout</varname> (<type>integer</type>)</term>
<indexterm>
- <primary><varname>replication_timeout</> configuration parameter</primary>
+ <primary><varname>wal_sender_timeout</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
@@ -2251,12 +2251,6 @@ include 'filename'
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>
@@ -2474,11 +2468,6 @@ include 'filename'
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 a sending server,
- <varname>wal_receiver_status_interval</> must be enabled, and its value
- must be less than the value of <varname>replication_timeout</>.
- </para>
</listitem>
</varlistentry>
@@ -2507,6 +2496,25 @@ include 'filename'
</listitem>
</varlistentry>
+ <varlistentry id="guc-wal-receiver-timeout" xreflabel="wal_receiver_timeout">
+ <term><varname>wal_receiver_timeout</varname> (<type>integer</type>)</term>
+ <indexterm>
+ <primary><varname>wal_receiver_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 receiving standby server to detect a primary node crash or network
+ outage.
+ A value of zero disables the timeout mechanism. 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>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>
</sect1>
diff --git a/doc/src/sgml/release-9.1.sgml b/doc/src/sgml/release-9.1.sgml
index 6bc1c8c90eb..5fbdd7a1952 100644
--- a/doc/src/sgml/release-9.1.sgml
+++ b/doc/src/sgml/release-9.1.sgml
@@ -3322,7 +3322,7 @@
<listitem>
<para>
Add
- <link linkend="guc-replication-timeout"><varname>replication_timeout</></link>
+ <varname>replication_timeout</>
setting (Fujii Masao, Heikki Linnakangas)
</para>