From 2eeb288573c5da1d5930858d0301e8c8b9351414 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 5 Mar 2019 10:59:19 +0900 Subject: [PATCH] repmgrd: ignore invalid "upstream_last_seen" value --- repmgrd-physical.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgrd-physical.c b/repmgrd-physical.c index 47756c20..410342f4 100644 --- a/repmgrd-physical.c +++ b/repmgrd-physical.c @@ -3332,7 +3332,7 @@ do_election(void) */ - if (sibling_replication_info.upstream_last_seen < (config_file_options.monitor_interval_secs * 2)) + if (sibling_replication_info.upstream_last_seen >= 0 && sibling_replication_info.upstream_last_seen < (config_file_options.monitor_interval_secs * 2)) { nodes_with_primary_still_visible++; log_notice(_("node %i last saw primary node %i second(s) ago, considering primary still visible"),