From c18b4b384a963e04cc5b5b50537c150858824f0a Mon Sep 17 00:00:00 2001
From: Laurenz Albe <laurenz.albe@cybertec.at>
Date: Tue, 9 Jul 2019 11:15:09 +0200
Subject: [PATCH] Better documentation for "pg_receivewal --synchronous"

"synchronous_commit" must not be set to "remote_apply" because
pg_receivewal doesn't apply WAL.
---
 doc/src/sgml/ref/pg_receivewal.sgml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index 0506120c00..4393eeee2c 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -52,7 +52,10 @@ PostgreSQL documentation
    Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivewal</application>
    by default flushes WAL data only when a WAL file is closed.
    The option <option>--synchronous</option> must be specified to flush WAL data
-   in real time.
+   in real time.  Note that while WAL will be flushed with this setting,
+   it will never be applied, so <xref linkend="guc-synchronous-commit"/> must
+   not be set to <literal>remote_apply</literal> if <application>pg_receivewal</application>
+   is the only synchronous standby.
   </para>
 
   <para>
-- 
2.20.1

