From de573edaaa1eea2a55dcbfd0b32f496decc95c1c Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 12 May 2016 14:05:44 +0900 Subject: [PATCH] Remove extraneous PQfinish() --- repmgrd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repmgrd.c b/repmgrd.c index f856ca7b..9376cd94 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -1572,7 +1572,10 @@ do_master_failover(void) return; } + + /* Close the connection to this server */ PQfinish(my_local_conn); + my_local_conn = NULL; /* XXX double-check the promotion candidate did become the new primary */ @@ -1588,9 +1591,6 @@ do_master_failover(void) fflush(stderr); } - /* Close the connection to this server */ - PQfinish(my_local_conn); - my_local_conn = NULL; log_debug(_("executing follow command: \"%s\"\n"), local_options.follow_command);