From 3e9f156d3c2f31dce1bd887ac769d0e62498ea88 Mon Sep 17 00:00:00 2001 From: Tom Janson Date: Thu, 5 Mar 2020 14:15:09 +0100 Subject: [PATCH] fix inverted log message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When trying to follow a new primary, the type of the new primary is checked. When it is *not* of type primary, a warning is logged and the follow attempt is aborted. As far as I can tell, the message itself is exactly the opposite of what it should be: The node is not primary, thus it is standby / "in recovery". Feel free to correct me if I’m misunderstanding. --- repmgrd-physical.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repmgrd-physical.c b/repmgrd-physical.c index 70e42a88..8b8a1a23 100644 --- a/repmgrd-physical.c +++ b/repmgrd-physical.c @@ -3655,7 +3655,7 @@ follow_new_primary(int new_primary_id) else { new_primary_ok = false; - log_warning(_("new primary is not in recovery")); + log_warning(_("new primary is in recovery")); close_connection(&upstream_conn); } } @@ -3848,7 +3848,7 @@ witness_follow_new_primary(int new_primary_id) break; case RECTYPE_STANDBY: new_primary_ok = false; - log_warning(_("new primary is not in recovery")); + log_warning(_("new primary is in recovery")); break; case RECTYPE_UNKNOWN: new_primary_ok = false;