do not exit in getMasterConnection()

This commit is contained in:
Christian Kruse
2014-01-16 15:07:15 +01:00
parent 192ee3cdb0
commit 4f3bd6612c
2 changed files with 6 additions and 2 deletions

View File

@@ -359,8 +359,7 @@ getMasterConnection(PGconn *standby_conn, char *schema, char *cluster,
log_err(_("Can't get nodes info: %s\n"),
PQerrorMessage(standby_conn));
PQclear(res1);
PQfinish(standby_conn);
exit(ERR_DB_QUERY);
return NULL;
}
for (i = 0; i < PQntuples(res1); i++)

View File

@@ -1433,6 +1433,11 @@ do_standby_follow(void)
do
{
if (!is_pgup(conn, options.master_response_timeout))
{
conn = establishDBConnection(options.conninfo, true);
}
master_conn = getMasterConnection(conn, repmgr_schema,
options.cluster_name, &master_id,(char *) &master_conninfo);
}