From 4f849de95ea36cb67f019de16e2196da921bc817 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 5 Jan 2016 13:16:38 +0900 Subject: [PATCH] Suppress warning about -w/--wal-keep-segments unless actually specified Already implemented in HEAD. --- repmgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repmgr.c b/repmgr.c index 9959658a..f15491f4 100644 --- a/repmgr.c +++ b/repmgr.c @@ -113,6 +113,8 @@ static bool config_file_required = true; /* Initialization of runtime options */ t_runtime_options runtime_options = T_RUNTIME_OPTIONS_INITIALIZER; t_configuration_options options = T_CONFIGURATION_OPTIONS_INITIALIZER; +static bool wal_keep_segments_used = false; + static char *server_mode = NULL; static char *server_cmd = NULL; @@ -164,7 +166,6 @@ main(int argc, char **argv) int c, targ; int action = NO_ACTION; bool check_upstream_config = false; - bool wal_keep_segments_used = false; bool config_file_parsed = false; char *ptr = NULL; @@ -3136,7 +3137,7 @@ check_parameters_for_action(const int action) error_list_append(&cli_warnings, _("-r/--rsync-only can only be used when executing STANDBY CLONE")); } - if (runtime_options.wal_keep_segments) + if (wal_keep_segments_used) { error_list_append(&cli_warnings, _("-w/--wal-keep-segments can only be used when executing STANDBY CLONE")); }