On Thu, 2019-06-27 at 10:06 -0400, Jesper Pedersen wrote: > Here is a patch for the pg_receivewal documentation to highlight that > WAL isn't acknowledged to be applied.
I think it is a good idea to document this, but I have a few quibbles with the patch as it is: - I think there shouldn't be commas after the "note" and before the "if". Disclaimer: I am not a native speaker, so I am lacking authority. - The assertion is wrong. "on" (remote flush) is perfectly fine for synchronous_commit, only "remote_apply" is a problem. - There is already something about "--synchronous" in the "Description" section. It might make sense to add the additional information there. How about the attached patch? Yours, Laurenz Albe
From c18b4b384a963e04cc5b5b50537c150858824f0a Mon Sep 17 00:00:00 2001 From: Laurenz Albe <laurenz.a...@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