Basic failover for cascaded standby nodes

Attempt to attach to the next available upstream node, otherwise
quit monitoring. We'll need to add further options for failover
scenarios, including attempting to attach to another node,
shutting down the server completely etc.
This commit is contained in:
Ian Barwick
2015-01-24 04:22:40 +09:00
parent 3be8bf8e4c
commit 84a4766f13
2 changed files with 108 additions and 12 deletions

View File

@@ -468,7 +468,7 @@ get_upstream_connection(PGconn *standby_conn, char *cluster, int node_id,
cluster,
node_id);
log_debug("%s\n", sqlquery);
log_debug("get_upstream_connection(): %s\n", sqlquery);
res = PQexec(standby_conn, sqlquery);