Hi,
On 7/16/19 12:28 PM, Laurenz Albe wrote:
This is not true in all cases as since 9.6 it is possible to specify
multiple synchronous standbys. So if for example pg_receivewal and
another synchronous standby are set in s_s_names and that the number
of a FIRST (priority-based) or ANY (quorum set) is two, then the same
issue exists, but this documentation is incorrect. I think that we
should have a more extensive wording here, like "if pg_receivewal is
part of a quorum-based or priority-based set of synchronous standbys."
I think this would be overly complicated.
The wording above seems to cover the priority-based base sufficiently
in my opinion.
Maybe a second sentence with more detail would be better:
... must not be set to <literal>remote_apply</literal> if
<application>pg_receivewal</application> is the only synchronous standby.
Similarly, if <application>pg_receivewal</application> is part of
a quorum-based set of synchronous standbys, it won't count towards
the quorum if <xref linkend="guc-synchronous-commit"/> is set to
<literal>remote_apply</literal>.
Here is the patch for that.
Best regards,
Jesper
>From 4fb28d6fe08ddea5a9740c9a81e8e00b94283d78 Mon Sep 17 00:00:00 2001
From: jesperpedersen <jesper.peder...@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 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index 0506120c00..03b20ecd38 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -207,6 +207,18 @@ 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> if <application>pg_receivewal</application>
+ is the only synchronous standby. Similarly, if
+ <application>pg_receivewal</application> is part of a quorum-based
+ set of synchronous standbys, it won't count towards the quorum if
+ <xref linkend="guc-synchronous-commit"/> is set to
+ <literal>remote_apply</literal>.
+ </para>
</listitem>
</varlistentry>
--
2.21.0