From 870a367d3b4c8aa85b8325592fbf516182ec1e91 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Mon, 10 Apr 2017 22:49:14 +0900 Subject: [PATCH] repmgr: prevent spurious error message when running 'standby switchover' When 'repmgr standby follow' is run on a dormant server, with connection parameters for the upstream node provided (which is done during the switchover process to reintegrate the stopped former master into the replication cluster), a spurious error message is generated about a slot which cannot be deleted as it's active. During the switchover process the current master's (former standby's) slot on the former master is deleted at a later point so can be skipped here. The error message is annoying but harmless and has no effect on the switchover process. Addresses GitHub #285. --- repmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgr.c b/repmgr.c index fda37610..08897985 100644 --- a/repmgr.c +++ b/repmgr.c @@ -4764,7 +4764,7 @@ do_standby_follow(void) * (a former standby) exists on the former upstream, drop it. */ - if (options.use_replication_slots && original_upstream_node_id != UNKNOWN_NODE_ID) + if (options.use_replication_slots && runtime_options.host_param_provided == false && original_upstream_node_id != UNKNOWN_NODE_ID) { t_node_info upstream_node_record = T_NODE_INFO_INITIALIZER; int upstream_query_result;