From 51d56684a74de7ecedb3c25f89b4f19e3b94eb39 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Mon, 6 Jul 2020 10:21:00 +0900 Subject: [PATCH] node status: clarify "archive_mode" message on standbys "archive_mode = 'always'" available from PostgreSQL 9.5. --- repmgr-action-node.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/repmgr-action-node.c b/repmgr-action-node.c index 74454cc9..b9d07242 100644 --- a/repmgr-action-node.c +++ b/repmgr-action-node.c @@ -208,7 +208,16 @@ do_node_status(void) if (enabled == false && recovery_type == RECTYPE_STANDBY) { - appendPQExpBufferStr(&archiving_status, " (on standbys \"archive_mode\" must be set to \"always\" to be effective)"); + if (PQserverVersion(conn) >= 90500) + { + appendPQExpBufferStr(&archiving_status, + " (on standbys \"archive_mode\" must be set to \"always\" to be effective)"); + } + else + { + appendPQExpBufferStr(&archiving_status, + " (\"archive_mode\" has no effect on standbys)"); + } } key_value_list_set(&node_status,