repmgr: "witness register" - check connection is to primary node

Previously, if the witness server connection details were provided
to "repmgr witness register" rather than those of the primary server,
repmgr a) write the node record to the witness server rather than
the primary, and b) would loop indefinitely trying to copy the
node table to itself.

Addresses GitHub #538.
This commit is contained in:
Ian Barwick
2019-02-04 14:42:20 +09:00
parent f9a1861ded
commit 2c9700586c
4 changed files with 74 additions and 8 deletions

View File

@@ -137,6 +137,13 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
</para>
</listitem>
<listitem>
<para>
&repmgr;: when executing <command><link linkend="repmgr-witness-register">repmgr witness register</link></command>,
chech the node to connected is actually the primary (i.e. not the witness server). (GitHub #528).
</para>
</listitem>
<listitem>
<para>
&repmgr;: when executing <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>,
@@ -315,7 +322,6 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
</para>
</listitem>
<listitem>
<para>
<application>repmgrd</application>: fix parsing of <option>-d/--daemonize</option> option.