mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Fix query in is_active_bdr_node()
Boolean column was not being checked correctly. Also add detail output in "repmgr node role --check", where the function is called.
This commit is contained in:
@@ -728,8 +728,7 @@ do_node_check_role(PGconn *conn, OutputMode mode, t_node_info *node_info, CheckS
|
||||
}
|
||||
else
|
||||
{
|
||||
appendPQExpBuffer(
|
||||
&details,
|
||||
appendPQExpBuffer(&details,
|
||||
_("node is primary"));
|
||||
}
|
||||
break;
|
||||
@@ -754,8 +753,7 @@ do_node_check_role(PGconn *conn, OutputMode mode, t_node_info *node_info, CheckS
|
||||
if (is_bdr_db(conn, &output) == false)
|
||||
{
|
||||
status = CHECK_STATUS_CRITICAL;
|
||||
appendPQExpBuffer(
|
||||
&details,
|
||||
appendPQExpBuffer(&details,
|
||||
"%s", output.data);
|
||||
}
|
||||
termPQExpBuffer(&output);
|
||||
@@ -768,6 +766,11 @@ do_node_check_role(PGconn *conn, OutputMode mode, t_node_info *node_info, CheckS
|
||||
appendPQExpBuffer(&details,
|
||||
_("node is not an active BDR node"));
|
||||
}
|
||||
else
|
||||
{
|
||||
appendPQExpBuffer(&details,
|
||||
_("node is an active BDR node"));
|
||||
}
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user