@@ -1507,8 +1507,9 @@ SET ENABLE_SEQSCAN TO OFF;
15071507 <para>
15081508 Specifies whether transaction commit will wait for WAL records
15091509 to be written to disk before the command returns a <quote>success</>
1510- indication to the client. The default, and safe, setting is
1511- <literal>on</>. When <literal>off</>, there can be a delay between
1510+ indication to the client. Valid values are <literal>on</>,
1511+ <literal>local</>, and <literal>off</>. The default, and safe, value
1512+ is <literal>on</>. When <literal>off</>, there can be a delay between
15121513 when success is reported to the client and when the transaction is
15131514 really guaranteed to be safe against a server crash. (The maximum
15141515 delay is three times <xref linkend="guc-wal-writer-delay">.) Unlike
@@ -1522,6 +1523,19 @@ SET ENABLE_SEQSCAN TO OFF;
15221523 exact certainty about the durability of a transaction. For more
15231524 discussion see <xref linkend="wal-async-commit">.
15241525 </para>
1526+ <para>
1527+ If <xref linkend="guc-synchronous-standby-names"> is set, this
1528+ parameter also controls whether or not transaction commit will wait
1529+ for the transaction's WAL records to be flushed to disk and replicated
1530+ to the standby server. The commit wait will last until a reply from
1531+ the current synchronous standby indicates it has written the commit
1532+ record of the transaction to durable storage. If synchronous
1533+ replication is in use, it will normally be sensible either to wait
1534+ both for WAL records to reach both the local and remote disks, or
1535+ to allow the transaction to commit asynchronously. However, the
1536+ special value <literal>local</> is available for transactions that
1537+ wish to wait for local flush to disk, but not synchronous replication.
1538+ </para>
15251539 <para>
15261540 This parameter can be changed at any time; the behavior for any
15271541 one transaction is determined by the setting in effect when it
@@ -2057,39 +2071,6 @@ SET ENABLE_SEQSCAN TO OFF;
20572071 </para>
20582072
20592073 <variablelist>
2060- <varlistentry id="guc-synchronous-replication" xreflabel="synchronous_replication">
2061- <term><varname>synchronous_replication</varname> (<type>boolean</type>)</term>
2062- <indexterm>
2063- <primary><varname>synchronous_replication</> configuration parameter</primary>
2064- </indexterm>
2065- <listitem>
2066- <para>
2067- Specifies whether transaction commit will wait for WAL records
2068- to be replicated before the command returns a <quote>success</>
2069- indication to the client. The default setting is <literal>off</>.
2070- When <literal>on</>, there will be a delay while the client waits
2071- for confirmation of successful replication. That delay will
2072- increase depending upon the physical distance and network activity
2073- between primary and standby. The commit wait will last until a
2074- reply from the current synchronous standby indicates it has written
2075- the commit record of the transaction to durable storage. This
2076- parameter has no effect if
2077- <xref linkend="guc-synchronous-standby-names"> is empty or
2078- <xref linkend="guc-max-wal-senders"> is zero.
2079- </para>
2080- <para>
2081- This parameter can be changed at any time; the
2082- behavior for any one transaction is determined by the setting in
2083- effect when it commits. It is therefore possible, and useful, to have
2084- some transactions replicate synchronously and others asynchronously.
2085- For example, to make a single multistatement transaction commit
2086- asynchronously when the default is synchronous replication, issue
2087- <command>SET LOCAL synchronous_replication TO OFF</> within the
2088- transaction.
2089- </para>
2090- </listitem>
2091- </varlistentry>
2092-
20932074 <varlistentry id="guc-synchronous-standby-names" xreflabel="synchronous_standby_names">
20942075 <term><varname>synchronous_standby_names</varname> (<type>string</type>)</term>
20952076 <indexterm>
@@ -2098,7 +2079,7 @@ SET ENABLE_SEQSCAN TO OFF;
20982079 <listitem>
20992080 <para>
21002081 Specifies a priority ordered list of standby names that can offer
2101- synchronous replication. At any one time there will bejust one
2082+ synchronous replication. At any one time there will beat most one
21022083 synchronous standby that will wake sleeping users following commit.
21032084 The synchronous standby will be the first named standby that is
21042085 both currently connected and streaming in real-time to the standby
@@ -2114,18 +2095,17 @@ SET ENABLE_SEQSCAN TO OFF;
21142095 not enforced for uniqueness. In case of duplicates one of the standbys
21152096 will be chosen to be the synchronous standby, though exactly which
21162097 one is indeterminate.
2117- </para>
2118- <para>
2119- No value is set by default.
21202098 The special entry <literal>*</> matches any application_name, including
21212099 the default application name of <literal>walreceiver</>.
21222100 </para>
21232101 <para>
2124- If a standby is removed from the list of servers then it will stop
2125- being the synchronous standby, allowing another to take its place.
2126- If the list is empty, synchronous replication will not be
2127- possible, whatever the setting of <varname>synchronous_replication</>.
2128- Standbys may also be added to the list without restarting the server.
2102+ If no synchronous standby names are specified, then synchronous
2103+ replication is not enabled and transaction commit will never wait for
2104+ replication. This is the default configuration. Even when
2105+ synchronous replication is enabled, individual transactions can be
2106+ configured not to wait for replication by setting the
2107+ <xref linkend="guc-synchronous-commit"> parameter to
2108+ <literal>local</> or <literal>off</>.
21292109 </para>
21302110 </listitem>
21312111 </varlistentry>