mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22: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:
@@ -22,10 +22,10 @@
|
||||
passwordless SSH connection to the current primary.
|
||||
</para>
|
||||
<para>
|
||||
If other standbys are connected to the demotion candidate, &repmgr; can instruct
|
||||
If other nodes are connected to the demotion candidate, &repmgr; can instruct
|
||||
these to follow the new primary if the option <literal>--siblings-follow</literal>
|
||||
is specified. This requires a passwordless SSH connection between the promotion
|
||||
candidate (new primary) and the standbys attached to the demotion candidate
|
||||
candidate (new primary) and the nodes attached to the demotion candidate
|
||||
(existing primary).
|
||||
</para>
|
||||
<note>
|
||||
@@ -150,7 +150,11 @@
|
||||
<term><option>--siblings-follow</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Have standbys attached to the old primary follow the new primary.
|
||||
Have nodes attached to the old primary follow the new primary.
|
||||
</para>
|
||||
<para>
|
||||
This will also ensure that a witness node, if in use, is updated
|
||||
with the new primary's data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
Ensure that a passwordless SSH connection is possible from the promotion candidate
|
||||
(standby) to the demotion candidate (current primary). If <literal>--siblings-follow</literal>
|
||||
will be used, ensure that passwordless SSH connections are possible from the
|
||||
promotion candidate to all standbys attached to the demotion candidate.
|
||||
promotion candidate to all nodes attached to the demotion candidate
|
||||
(including the witness server, if in use).
|
||||
</para>
|
||||
|
||||
<note>
|
||||
|
||||
@@ -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