From 73661637e98e0f323faa85d6b33b7a82cb76976a Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Fri, 13 Nov 2015 14:47:10 +0900 Subject: [PATCH] Add hint about -c/--fast-checkpoint When cloning a server without this option, and pg_start_backup() takes time to complete, repmgr appears to hang and give no indication of what may or may not be happening. The hint provides an explanation for any delay and possible action which could be taken to mitigate it. --- repmgr.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/repmgr.c b/repmgr.c index 81952dc2..8d382f9d 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1317,8 +1317,6 @@ do_standby_clone(void) strncpy(local_ident_file, master_ident_file, MAXFILENAME); } - log_notice(_("starting backup...\n")); - /* * When using rsync only, we need to check the SSH connection early */ @@ -1346,6 +1344,12 @@ do_standby_clone(void) goto stop_backup; } + log_notice(_("starting backup...\n")); + if (runtime_options.fast_checkpoint == false) + { + log_hint(_("this may take some time; consider using the -c/--fast-checkpoint option\n")); + } + if (runtime_options.rsync_only) { PQExpBufferData tablespace_map; @@ -1358,7 +1362,7 @@ do_standby_clone(void) } /* - * From pg 9.1 default is to wait for a sync standby to ack, avoid that by + * From 9.1 default is to wait for a sync standby to ack, avoid that by * turning off sync rep for this session */ if (set_config_bool(upstream_conn, "synchronous_commit", false) == false)