@@ -2220,7 +2220,7 @@ include_dir 'conf.d'
2220
2220
Specifies whether transaction commit will wait for WAL records
2221
2221
to be written to disk before the command returns a <quote>success</>
2222
2222
indication to the client. Valid values are <literal>on</>,
2223
- <literal>remote_write </>, <literal>remote_apply </>, <literal>local</>,
2223
+ <literal>remote_apply </>, <literal>remote_write </>, <literal>local</>,
2224
2224
and <literal>off</>. The default, and safe, setting
2225
2225
is <literal>on</>. When <literal>off</>, there can be a delay between
2226
2226
when success is reported to the client and when the transaction is
@@ -2237,36 +2237,33 @@ include_dir 'conf.d'
2237
2237
discussion see <xref linkend="wal-async-commit">.
2238
2238
</para>
2239
2239
<para>
2240
- If <xref linkend="guc-synchronous-standby-names"> is set , this
2240
+ If <xref linkend="guc-synchronous-standby-names"> is non-empty , this
2241
2241
parameter also controls whether or not transaction commits will wait
2242
- for the transaction's WAL records to be replicated to the standby
2243
- server.
2244
- When set to <literal>on</>, commits will wait until a reply
2245
- from the current synchronous standby indicates it has received
2242
+ for their WAL records to be replicated to the standby server(s).
2243
+ When set to <literal>on</>, commits will wait until replies
2244
+ from the current synchronous standby(s) indicate they have received
2246
2245
the commit record of the transaction and flushed it to disk. This
2247
- ensures the transaction will not be lost unless both primary and
2248
- standby suffer corruption of their database storage.
2249
- When set to <literal>remote_apply</>, commits will wait until a reply
2250
- from the current synchronous standby indicates it has received the
2246
+ ensures the transaction will not be lost unless both the primary and
2247
+ all synchronous standbys suffer corruption of their database storage.
2248
+ When set to <literal>remote_apply</>, commits will wait until replies
2249
+ from the current synchronous standby(s) indicate they have received the
2251
2250
commit record of the transaction and applied it, so that it has become
2252
- visible to queries.
2253
- When set to <literal>remote_write</>, commits will wait
2254
- until a reply from the current synchronous standby indicates it has
2251
+ visible to queries on the standby(s) .
2252
+ When set to <literal>remote_write</>, commits will wait until replies
2253
+ from the current synchronous standby(s) indicate they have
2255
2254
received the commit record of the transaction and written it out to
2256
- the standby's operating system, but the data has not necessarily
2257
- reached stable storage on the standby. This setting is sufficient to
2258
- ensure data preservation even if the standby instance of
2255
+ their operating system. This setting is sufficient to
2256
+ ensure data preservation even if a standby instance of
2259
2257
<productname>PostgreSQL</> were to crash, but not if the standby
2260
- suffers an operating-system-level crash.
2258
+ suffers an operating-system-level crash, since the data has not
2259
+ necessarily reached stable storage on the standby.
2260
+ Finally, the setting <literal>local</> causes commits to wait for
2261
+ local flush to disk, but not for replication. This is not usually
2262
+ desirable when synchronous replication is in use, but is provided for
2263
+ completeness.
2261
2264
</para>
2262
2265
<para>
2263
- When synchronous
2264
- replication is in use, it will normally be sensible either to wait
2265
- for both local flush to disk and replication of WAL records, or
2266
- to allow the transaction to commit asynchronously. However, the
2267
- setting <literal>local</> is available for transactions that
2268
- wish to wait for local flush to disk, but not synchronous replication.
2269
- If <varname>synchronous_standby_names</> is not set, the settings
2266
+ If <varname>synchronous_standby_names</> is empty, the settings
2270
2267
<literal>on</>, <literal>remote_apply</>, <literal>remote_write</>
2271
2268
and <literal>local</> all provide the same synchronization level:
2272
2269
transaction commits only wait for local flush to disk.
0 commit comments