From d0c5dffe912e223a82dffec113253b615c47af54 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Mon, 27 Apr 2020 13:55:02 +0900 Subject: [PATCH] standby clone: explicitly log that replication slots not in use Helps with diagnosing output. --- repmgr-action-standby.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index 4dd0f83a..9327ac91 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -6032,7 +6032,7 @@ check_upstream_config(PGconn *conn, int server_version_num, t_node_info *upstrea config_ok = false; } - if (config_file_options.use_replication_slots) + if (config_file_options.use_replication_slots == true) { pg_setting_ok = get_pg_setting_int(conn, "max_replication_slots", &i); @@ -6058,7 +6058,6 @@ check_upstream_config(PGconn *conn, int server_version_num, t_node_info *upstrea log_info(_("parameter \"max_replication_slots\" set to %i"), i); } } - /* * physical replication slots not available or not requested - check if * there are any circumstances where `wal_keep_segments` should be set @@ -6118,6 +6117,12 @@ check_upstream_config(PGconn *conn, int server_version_num, t_node_info *upstrea } + if (config_file_options.use_replication_slots == false && server_version_num >= 90400) + { + log_info(_("replication slot usage not requested; no replication slot will be set up for this standby")); + } + + /* * If archive_mode is enabled, check that 'archive_command' is non empty * (however it's not practical to check that it actually represents a