From 9433f80364322e0377a916ce4146372f251a25a5 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 7 Feb 2019 13:47:57 +0900 Subject: [PATCH] "cluster show": warn about nodes with paused WAL replay We do this in "repmgr daemon status" already, so do it here too for consistency. Related to GitHub #540. --- repmgr-action-cluster.c | 9 +++++++++ repmgr-action-daemon.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/repmgr-action-cluster.c b/repmgr-action-cluster.c index 48d5f39e..1fa797c3 100644 --- a/repmgr-action-cluster.c +++ b/repmgr-action-cluster.c @@ -305,7 +305,16 @@ do_cluster_show(void) error_found = true; } } + + /* warn about issue with paused WAL replay */ + if (is_wal_replay_paused(cell->node_info->conn, true)) + { + item_list_append_format(&warnings, + _("WAL replay is paused on node \"%s\" (ID: %i) with WAL replay pending; this node cannot be manually promoted until WAL replay is resumed"), + cell->node_info->node_name, cell->node_info->node_id); + } } + break; case WITNESS: case BDR: diff --git a/repmgr-action-daemon.c b/repmgr-action-daemon.c index 0c724fc0..bb724ef0 100644 --- a/repmgr-action-daemon.c +++ b/repmgr-action-daemon.c @@ -180,7 +180,7 @@ do_daemon_status(void) if (repmgrd_info[i]->wal_paused_pending_wal == true) { item_list_append_format(&warnings, - "WAL replay is paused on node \"%s\" (ID: %i) with WAL replay pending; this node cannot be promoted", + _("WAL replay is paused on node \"%s\" (ID: %i) with WAL replay pending; this node cannot be manually promoted until WAL replay is resumed"), cell->node_info->node_name, cell->node_info->node_id); } }