mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
pg_basebackup: Add option to create replication slot
When requesting a particular replication slot, the new pg_basebackup option -C/--create-slot creates it before starting to replicate from it. Further refactor the slot creation logic to include the temporary slot creation logic into the same function. Add new arguments is_temporary and preserve_wal to CreateReplicationSlot(). Print in --verbose mode that a slot has been created. Author: Michael Banck <michael.banck@credativ.de>
This commit is contained in:
@ -382,6 +382,18 @@ PostgreSQL documentation
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-C</option></term>
|
||||
<term><option>--create-slot</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
This option causes the replication slot specified by the
|
||||
option <literal>--slot</literal> to be created before starting the
|
||||
backup. In this case, an error is raised if the slot already exists.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-l <replaceable class="parameter">label</replaceable></option></term>
|
||||
<term><option>--label=<replaceable class="parameter">label</replaceable></option></term>
|
||||
@ -462,6 +474,10 @@ 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>
|
||||
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
|
||||
|
Reference in New Issue
Block a user