diff options
author | Magnus Hagander <magnus@hagander.net> | 2017-04-01 17:20:05 +0200 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2017-04-01 17:20:05 +0200 |
commit | b88b929a707145964b707257049f8dbfd58f0da5 (patch) | |
tree | f2e964b67ee1d98f1b01daebf0f7934c19485d05 /src | |
parent | fb1879c374581c0f0e251e94c0087c8385b91f5b (diff) | |
download | postgresql-b88b929a707145964b707257049f8dbfd58f0da5.tar.gz postgresql-b88b929a707145964b707257049f8dbfd58f0da5.zip |
Back-patch checkpoint clarification docs and pg_basebackup updates
This backpatches 51e26c9 and 7220c7b, including both documentation
updates clarifying the checkpoints at the beginning of base backups and
the messages in verbose and progress mdoe of pg_basebackup.
Author: Michael Banck
Discussion: https://postgr.es/m/21444.1488142764%40sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_basebackup/pg_basebackup.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index a5bc3225337..613f2e159c3 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1661,6 +1661,14 @@ BaseBackup(void) if (maxrate > 0) maxrate_clause = psprintf("MAX_RATE %u", maxrate); + if (verbose) + fprintf(stderr, + _("%s: initiating base backup, waiting for checkpoint to complete\n"), + progname); + + if (showprogress && !verbose) + fprintf(stderr, "waiting for checkpoint\r"); + basebkp = psprintf("BASE_BACKUP LABEL '%s' %s %s %s %s %s %s", escaped_label, @@ -1698,6 +1706,9 @@ BaseBackup(void) strlcpy(xlogstart, PQgetvalue(res, 0, 0), sizeof(xlogstart)); + if (verbose) + fprintf(stderr, _("%s: checkpoint completed\n"), progname); + /* * 9.3 and later sends the TLI of the starting point. With older servers, * assume it's the same as the latest timeline reported by |