Now that we can have no monitoring we need to check all nodes at failover

not only those in repl_monitor
This commit is contained in:
Jaime Casanova
2012-07-21 17:49:38 -05:00
parent d43c6334da
commit 664e1a8321

View File

@@ -608,11 +608,10 @@ do_failover(void)
/* get a list of standby nodes, including myself */ /* get a list of standby nodes, including myself */
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 <> %d "
" AND id <> %d "
" AND cluster = '%s' " " AND cluster = '%s' "
" ORDER BY priority ", " ORDER BY priority ",
repmgr_schema, repmgr_schema, primary_options.node, local_options.cluster_name); 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)