Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Not even consider old master as an option in failover

  • Loading branch information...
commit 89a1e2bcbdd84657a21eb456ebf604071dc9d5be 1 parent 7077a7c
@Jaime2ndQuadrant Jaime2ndQuadrant authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.