mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
Not even consider old master as an option in failover
This commit is contained in:
@@ -594,9 +594,10 @@ do_failover(void)
|
|||||||
sprintf(sqlquery, "SELECT id, conninfo "
|
sprintf(sqlquery, "SELECT id, conninfo "
|
||||||
" FROM %s.repl_nodes "
|
" FROM %s.repl_nodes "
|
||||||
" WHERE id IN (SELECT standby_node FROM %s.repl_status) "
|
" WHERE id IN (SELECT standby_node FROM %s.repl_status) "
|
||||||
|
" AND id <> %d "
|
||||||
" AND cluster = '%s' "
|
" AND cluster = '%s' "
|
||||||
" ORDER BY priority ",
|
" 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);
|
res1 = PQexec(myLocalConn, sqlquery);
|
||||||
if (PQresultStatus(res1) != PGRES_TUPLES_OK)
|
if (PQresultStatus(res1) != PGRES_TUPLES_OK)
|
||||||
|
|||||||
Reference in New Issue
Block a user