diff --git a/repmgrd-physical.c b/repmgrd-physical.c index a175cf2d9..efb065a25 100644 --- a/repmgrd-physical.c +++ b/repmgrd-physical.c @@ -868,7 +868,7 @@ monitor_streaming_standby(void) { primary_conn = upstream_conn; - if (get_recovery_type(primary_conn) != RECTYPE_PRIMARY) + if (get_recovery_type(primary_conn) == RECTYPE_STANDBY) { ExecStatusType ping_result; @@ -1322,7 +1322,7 @@ monitor_streaming_standby(void) if (PQstatus(primary_conn) == CONNECTION_OK) { - if (get_recovery_type(primary_conn) != RECTYPE_PRIMARY) + if (get_recovery_type(primary_conn) == RECTYPE_STANDBY) { log_notice(_("current upstream node \"%s\" (node ID: %i) is not primary, restarting monitoring"), upstream_node_info.node_name, upstream_node_info.node_id); @@ -1335,8 +1335,6 @@ monitor_streaming_standby(void) } } - log_debug("YYY here3 active ? %c", local_node_info.active ? 't' : 'f'); - /* we've reconnected to the local node after an outage */ if (local_node_info.active == false) {