diff --git a/repmgrd.c b/repmgrd.c index 37edcd8c..f79c2250 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -662,6 +662,10 @@ standby_monitor(void) terminate(1); } + // ZZZ if connected to cascading standby, check primary conn too; + // if original primary has gone away we'll need to get the new one + // from the upstream node to write monitoring information + upstream_conn = get_upstream_connection(my_local_conn, local_options.cluster_name, local_options.node, @@ -682,7 +686,6 @@ standby_monitor(void) * l seconds */ - if (PQstatus(upstream_conn) != CONNECTION_OK) { PQfinish(upstream_conn);