From 780453e16821f061ee09170adb081b671e6d54e2 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Fri, 3 Apr 2020 13:02:49 +0900 Subject: [PATCH] repmgrd: clarify log messages Display the identity of the node question in the meassges fixed in commit 8a27c89; this makes it easier to diagnose log output. --- repmgrd-physical.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/repmgrd-physical.c b/repmgrd-physical.c index 3a6d3cfb..c6e68549 100644 --- a/repmgrd-physical.c +++ b/repmgrd-physical.c @@ -3683,7 +3683,9 @@ follow_new_primary(int new_primary_id) else { new_primary_ok = false; - log_warning(_("new primary is in recovery")); + log_warning(_("new primary \"%s\" (node ID: %i) is in recovery"), + new_primary.node_name, + new_primary_id); close_connection(&upstream_conn); } } @@ -3876,7 +3878,9 @@ witness_follow_new_primary(int new_primary_id) break; case RECTYPE_STANDBY: new_primary_ok = false; - log_warning(_("new primary is in recovery")); + log_warning(_("new primary \"%s\" (node ID: %i) is in recovery"), + new_primary.node_name, + new_primary_id); break; case RECTYPE_UNKNOWN: new_primary_ok = false;