summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-07-24 11:26:33 +0900
committerMichael Paquier <michael@paquier.xyz>2019-07-24 11:26:33 +0900
commit1c423463e4b91ec784b935895d77b6ceb3301141 (patch)
tree9f488ce4e636fc15d1a0b3ece6e04db4f0d4cbd5
parent46fb7ff65ec29f7aab2e479ab43a180d67a267ed (diff)
Doc: Clarify interactions of pg_receivewal with remote_apply
Using pg_receivewal with synchronous_commit = remote_apply set in the backend is incompatible if pg_receivewal is a synchronous standby as it never applies WAL, so document this problem and solutions to it. Backpatch to 9.6, where remote_apply has been added. Author: Robert Haas, Jesper Pedersen Reviewed-by: Laurenz Albe, Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/1427a2d3-1e51-9335-1931-4f8853d90d5e@redhat.com Backpatch-through: 9.6
-rw-r--r--doc/src/sgml/ref/pg_receivewal.sgml12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index a17082bb11c..cd4f4917791 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -52,7 +52,17 @@ PostgreSQL documentation
Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivewal</>
by default flushes WAL data only when a WAL file is closed.
The option <option>--synchronous</> must be specified to flush WAL data
- in real time.
+ in real time. Since <application>pg_receivewal</application> does not
+ apply WAL, you should not allow it to become a synchronous standby when
+ <xref linkend="guc-synchronous-commit"/> equals
+ <literal>remote_apply</literal>. If it does, it will appear to be a
+ standby that never catches up, and will cause transaction commits to
+ block. To avoid this, you should either configure an appropriate value
+ for <xref linkend="guc-synchronous-standby-names"/>, or specify
+ <varname>application_name</varname> for
+ <application>pg_receivewal</application> that does not match it, or
+ change the value of <varname>synchronous_commit</varname> to
+ something other than <literal>remote_apply</literal>.
</para>
<para>