Not even consider old master as an option in failover

This commit is contained in:
Jaime Casanova
2011-11-27 19:17:59 -05:00
parent 7077a7c68f
commit 89a1e2bcbd

View File

@@ -594,9 +594,10 @@ do_failover(void)
sprintf(sqlquery, "SELECT id, conninfo "
" FROM %s.repl_nodes "
" WHERE id IN (SELECT standby_node FROM %s.repl_status) "
" AND id <> %d "
" AND cluster = '%s' "
" ORDER BY priority ",
repmgr_schema, repmgr_schema, local_options.cluster_name);
repmgr_schema, repmgr_schema, primary_options.node, local_options.cluster_name);
res1 = PQexec(myLocalConn, sqlquery);
if (PQresultStatus(res1) != PGRES_TUPLES_OK)