mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 08:56:29 +00:00
standby switchover: list nodes which will remain attatched to the old primary
If --siblings-follow is not supplied, list all nodes which repmgr considers to be siblings (this will include the witness server, if in use), and which will remain attached to the old primary.
This commit is contained in:
@@ -3561,9 +3561,26 @@ do_standby_switchover(void)
|
||||
{
|
||||
if (sibling_nodes.node_count > 0)
|
||||
{
|
||||
PQExpBufferData nodes;
|
||||
NodeInfoListCell *cell;
|
||||
|
||||
initPQExpBuffer(&nodes);
|
||||
|
||||
for (cell = sibling_nodes.head; cell; cell = cell->next)
|
||||
{
|
||||
appendPQExpBuffer(&nodes,
|
||||
" %s (node ID: %i)",
|
||||
cell->node_info->node_name,
|
||||
cell->node_info->node_id);
|
||||
if (cell->next)
|
||||
appendPQExpBufferStr(&nodes, "\n");
|
||||
}
|
||||
|
||||
log_warning(_("%i sibling nodes found, but option \"--siblings-follow\" not specified"),
|
||||
sibling_nodes.node_count);
|
||||
log_detail(_("these nodes will remain attached to the current primary"));
|
||||
log_detail(_("these nodes will remain attached to the current primary:\n%s"), nodes.data);
|
||||
|
||||
termPQExpBuffer(&nodes);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user