summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2018-07-28 22:53:11 +0000
committerMichael Paquier2018-07-28 22:53:11 +0000
commitfa7d5b704a3786be0f3e3334dd506fe8a46b02bc (patch)
tree7cc7557ce73f7ba69ed36b452ae7c37bf986dd64
parente2c0df7828b9e91963a05f5151a7d6eead014132 (diff)
Add verbosity to pg_basebackup for sync
This is useful to know when the data copy has been finished. The current situation can be confusing for users as the last message is "waiting for background process to finish streaming", so it looks like this is taking time but the final sync is instead. Author: Jeff Janes Discussion: https://postgr.es/m/CAMkU=1ypeoMJ=tFBG8vP13sxEtXd4Pm_x1SqsJdW_RvzpcvN=A@mail.gmail.com
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index ef4cfc43847..96a4dce4bf4 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -2112,6 +2112,9 @@ BaseBackup(void)
*/
if (do_sync)
{
+ if (verbose)
+ fprintf(stderr,
+ _("%s: syncing data to disk ...\n"), progname);
if (format == 't')
{
if (strcmp(basedir, "-") != 0)