aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/ref/pg_basebackup.sgml10
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c11
2 files changed, 20 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index c26239076d8..f17c2d21228 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -361,7 +361,7 @@ PostgreSQL documentation
<term><option>--checkpoint=<replaceable class="parameter">fast|spread</replaceable></option></term>
<listitem>
<para>
- Sets checkpoint mode to fast or spread (default) (see <xref linkend="backup-lowlevel-base-backup">).
+ Sets checkpoint mode to fast (immediate) or spread (default) (see <xref linkend="backup-lowlevel-base-backup">).
</para>
</listitem>
</varlistentry>
@@ -569,6 +569,14 @@ PostgreSQL documentation
<title>Notes</title>
<para>
+ At the beginning of the backup, a checkpoint needs to be written on the
+ server the backup is taken from. Especially if the option
+ <literal>--checkpoint=fast</literal> is not used, this can take some time
+ during which <application>pg_basebackup</application> will be appear
+ to be idle.
+ </para>
+
+ <para>
The backup will include all files in the data directory and tablespaces,
including the configuration files and any additional files placed in the
directory by third parties. But only regular files and directories are
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 2748f58106f..60ead91a9da 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1643,6 +1643,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,
@@ -1680,6 +1688,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