From 9cf4616af180acf54f9a65288c4fc902217c8ad4 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 5 Feb 2020 14:29:30 +0900 Subject: [PATCH] standby switchover: mark successful if standby attaches later Handle corner case where standby (demotion candidate) doesn't attach during the main check cycle, but does at the final check, where we'll want to mark the operation as successful. --- repmgr-action-standby.c | 1 + 1 file changed, 1 insertion(+) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index dd6f68c7..dc358644 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -4844,6 +4844,7 @@ do_standby_switchover(void) remote_node_record.node_name); if (node_attached == NODE_ATTACHED) { + switchover_success = true; log_notice(_("switchover was successful")); log_detail(_("node \"%s\" is now primary and node \"%s\" is attached as standby"), local_node_record.node_name,