From f1ec4f9e715c798440288bb4e5c97100bf4efacc Mon Sep 17 00:00:00 2001
From: jesperpedersen <jesper.pedersen@redhat.com>
Date: Tue, 9 Jul 2019 13:14:25 -0400
Subject: [PATCH] Highlight that pg_receivewal doesn't apply WAL, and as such
 synchronous-commit needs to be remote_write or lower.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Authors: Ãlvaro Herrera, Laurenz Albe and Jesper Pedersen
Review-by: Ãlvaro Herrera, Laurenz Albe and Jesper Pedersen
---
 doc/src/sgml/ref/pg_receivewal.sgml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index 0506120c00..254315c6bf 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -207,6 +207,19 @@ PostgreSQL documentation
         server as a synchronous standby, to ensure that timely feedback is
         sent to the server.
        </para>
+
+       <para>
+        Note that while WAL will be flushed with this setting,
+        <application>pg_receivewal</application> never applies it, so
+        <xref linkend="guc-synchronous-commit"/> must not be set to
+        <literal>remote_apply</literal> or <literal>on</literal>
+        if <application>pg_receivewal</application> is the only synchronous standby.
+        Similarly, if <application>pg_receivewal</application> is part of a
+        priority-based synchronous replication setup (<literal>FIRST</literal>),
+        or a quorum-based setup (<literal>ANY</literal>) it won't count towards
+        the policy specified if <xref linkend="guc-synchronous-commit"/> is
+        set to <literal>remote_apply</literal> or <literal>on</literal>.
+       </para>
       </listitem>
      </varlistentry>
 
-- 
2.21.0

