Skip to content
Browse files

Not even consider old master as an option in failover

  • Loading branch information...
1 parent 7077a7c commit 89a1e2bcbdd84657a21eb456ebf604071dc9d5be @Jaime2ndQuadrant Jaime2ndQuadrant committed Nov 27, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 repmgrd.c
View
3 repmgrd.c
@@ -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)

0 comments on commit 89a1e2b

Please sign in to comment.
Something went wrong with that request. Please try again.