Don't close connection to master until upstream node updated

This commit is contained in:
Ian Barwick
2015-09-23 12:27:37 +09:00
parent ef6b24551a
commit 640abed18f
2 changed files with 4 additions and 1 deletions

View File

@@ -1765,7 +1765,6 @@ do_standby_follow(void)
strncpy(runtime_options.host, PQhost(master_conn), MAXLEN);
strncpy(runtime_options.masterport, PQport(master_conn), MAXLEN);
strncpy(runtime_options.username, PQuser(master_conn), MAXLEN);
PQfinish(master_conn);
log_info(_("changing standby's master\n"));
@@ -1801,8 +1800,11 @@ do_standby_follow(void)
options.node, master_id) == false)
{
log_err(_("unable to update upstream node"));
PQfinish(master_conn);
exit(ERR_BAD_CONFIG);
}
PQfinish(master_conn);
return;
}