safely to disk. This option causes
<command>pg_basebackup</command> to return without waiting, which is
faster, but means that a subsequent operating system crash can leave
the base backup corrupt. Generally, this option is useful for testing
but should not be used when creating a production installation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-P</option></term>
<term><option>--progress</option></term>
<listitem>
<para>
Enables progress reporting. Turning this on will deliver an approximate
progress report during the backup. Since the database may change during
the backup, this is only an approximation and may not end at exactly
<literal>100%</literal>. In particular, when WAL log is included in the
backup, the total amount of data cannot be estimated in advance, and
in this case the estimated target size will increase once it passes the
total estimate without WAL.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-r <replaceable class="parameter">rate</replaceable></option></term>
<term><option>--max-rate=<replaceable class="parameter">rate</replaceable></option></term>
<listitem>
<para>
Sets the maximum transfer rate at which data is collected from the
source server. This can be useful to limit the impact
of <application>pg_basebackup</application> on the server. Values
are in kilobytes per second. Use a suffix of <literal>M</literal>
to indicate megabytes per second. A suffix of <literal>k</literal>
is also accepted, and has no effect. Valid values are between 32
kilobytes per second and 1024 megabytes per second.
</para>
<para>
This option always affects transfer of the data directory. Transfer of
WAL files is only affected if the collection method
is <literal>fetch</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-S <replaceable>slotname</replaceable></option></term>
<term><option>--slot=<replaceable class="parameter">slotname</replaceable></option></term>
<listitem>
<para>
This option can only be used together with <literal>-X
stream</literal>. It causes WAL streaming to use the specified
replication slot. If the base backup is intended to be used as a
streaming-replication standby using a replication slot, the standby
should then use the same replication slot name as
<xref linkend="guc-primary-slot-name"/>. This ensures that the
primary server does not remove any necessary WAL data in the time
between the end of the base backup and the start of streaming
replication on the new standby.
</para>
<para>
The specified replication slot has to exist unless the
option <option>-C</option> is also used.
</para>
<para>
If this option is not specified and the server supports temporary
replication slots (version 10 and later), then a temporary replication
slot is automatically used for WAL streaming.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--sync-method=<replaceable class="parameter">method</replaceable></option></term>
<listitem>
<para>
When set to <literal>fsync</literal>, which is the default,
<command>pg_basebackup</command> will recursively open and synchronize
all files in the backup directory. When the plain format is used, the
search for files will follow symbolic links for the WAL directory and
each configured tablespace.
</para>
<para>
On Linux, <literal>syncfs</literal> may be used instead to ask the
operating system to synchronize the whole file system