From fed09ecaae8ebbac98911f0f7eac07ade4a3f005 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 2 May 2019 09:14:22 +0900 Subject: [PATCH] standby promote: have former siblings follow new primary --- repmgr-action-standby.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index b8366d9f..19cbef79 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -2248,6 +2248,19 @@ do_standby_promote(void) } _do_standby_promote_internal(local_conn); + + /* + * If --siblings-follow specified, attempt to make them follow the new + * primary + */ + if (runtime_options.siblings_follow == true && sibling_nodes.node_count > 0) + { + sibling_nodes_follow(&local_node_record, &sibling_nodes, &sibling_nodes_stats); + } + + clear_node_info_list(&sibling_nodes); + + return; }