1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Make pg_basebackup use temporary replication slots

Temporary replication slots will be used by default when wal streaming
is used and no slot name is specified with -S. If a slot name is
specified, then a permanent slot with that name is used. If --no-slot is
specified, then no permanent or temporary slot will be used.

Temporary slots are only used on 10.0 and newer, of course.
This commit is contained in:
Magnus Hagander
2017-01-16 13:56:43 +01:00
parent 8fa6019b40
commit e7b020f786
9 changed files with 101 additions and 8 deletions

View File

@ -240,6 +240,31 @@ PostgreSQL documentation
the server does not remove any necessary WAL data in the time between
the end of the base backup and the start of streaming replication.
</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>--no-slot</option></term>
<listitem>
<para>
This option prevents the creation of a temporary replication slot
during the backup even if it's supported by the server.
</para>
<para>
Temporary replication slots are created by default if no slot name
is given with the option <option>-S</option> when using log streaming.
</para>
<para>
The main purpose of this option is to allow taking a base backup when
the server is out of free replication slots. Using replication slots
is almost always preferred, because it prevents needed WAL from being
removed by the server during the backup.
</para>
</listitem>
</varlistentry>