1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add support for managing physical replication slots to pg_receivexlog.

pg_receivexlog already has the capability to use a replication slot to
reserve WAL on the upstream node. But the used slot currently has to
be created via SQL.

To allow using slots directly, without involving SQL, add
--create-slot and --drop-slot actions, analogous to the logical slot
manipulation support in pg_recvlogical.

Author: Michael Paquier
Discussion: CABUevEx+zrOHZOQg+dPapNPFRJdsk59b=TSVf30Z71GnFXhQaw@mail.gmail.com
This commit is contained in:
Andres Freund
2014-10-06 12:51:37 +02:00
parent c8b6cba84a
commit d9f38c7a55
2 changed files with 170 additions and 16 deletions

View File

@ -255,13 +255,42 @@ PostgreSQL documentation
to make sure that <application>pg_receivexlog</> cannot become the
synchronous standby through an incautious setting of
<xref linkend="guc-synchronous-standby-names">; it does not flush
data frequently enough for this to work correctly.
data frequently enough for this to work correctly. In
<option>--create-slot</option> mode, create the slot with this name.
In <option>--drop-slot</option> mode, delete the slot with this name.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
<application>pg_receivexlog</application> can perform one of the two
following actions in order to control physical replication slots:
<variablelist>
<varlistentry>
<term><option>--create-slot</option></term>
<listitem>
<para>
Create a new physical replication slot with the name specified in
<option>--slot</option>, then start to stream WAL.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--drop-slot</option></term>
<listitem>
<para>
Drop the replication slot with the name specified in
<option>--slot</option>, then exit.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Other options are also available: