mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
"witness register": fix primary node check
Addresses GitHub #377, based on report by user yonj1e in #373.
This commit is contained in:
1
HISTORY
1
HISTORY
@@ -18,6 +18,7 @@
|
||||
repmgr: fix parsing of "pg_basebackup_options"; GitHub #376 (Ian)
|
||||
repmgr: ensure "pg_subtrans" directory is created when cloning a standby in
|
||||
Barman mode (Ian)
|
||||
repmgr: fix primary node check in "witness register"; GitHub #377 (Ian)
|
||||
|
||||
4.0.2 2018-01-18
|
||||
repmgr: add missing -W option to getopt_long() invocation; GitHub #350 (Ian)
|
||||
|
||||
@@ -122,6 +122,12 @@
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
<command><link linkend="repmgr-witness-register">repmgr witness register</link></command>:
|
||||
fix primary node check (GitHub #377).
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</para>
|
||||
|
||||
@@ -110,12 +110,12 @@ do_witness_register(void)
|
||||
}
|
||||
|
||||
/* check primary node's recovery type */
|
||||
recovery_type = get_recovery_type(witness_conn);
|
||||
recovery_type = get_recovery_type(primary_conn);
|
||||
|
||||
if (recovery_type == RECTYPE_STANDBY)
|
||||
{
|
||||
log_error(_("provided primary node is a standby"));
|
||||
log_error(_("provide the connection details of the cluster's primary server"));
|
||||
log_hint(_("provide the connection details of the cluster's primary server"));
|
||||
|
||||
PQfinish(witness_conn);
|
||||
PQfinish(primary_conn);
|
||||
|
||||
Reference in New Issue
Block a user