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

walreceiver uses a temporary replication slot by default

If no permanent replication slot is configured using
primary_slot_name, the walreceiver now creates and uses a temporary
replication slot.  A new setting wal_receiver_create_temp_slot can be
used to disable this behavior, for example, if the remote instance is
out of replication slots.

Reviewed-by: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/CA%2Bfd4k4dM0iEPLxyVyme2RAFsn8SUgrNtBJOu81YqTY4V%2BnqZA%40mail.gmail.com
This commit is contained in:
Peter Eisentraut
2020-01-14 14:07:11 +01:00
parent ee4ac46c8e
commit 3297308278
6 changed files with 82 additions and 0 deletions

View File

@ -4124,6 +4124,26 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
</listitem>
</varlistentry>
<varlistentry id="guc-wal-receiver-create-temp-slot" xreflabel="wal_receiver_create_temp_slot">
<term><varname>wal_receiver_create_temp_slot</varname> (<type>boolean</type>)
<indexterm>
<primary><varname>wal_receiver_create_temp_slot</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Specifies whether a WAL receiver should create a temporary replication
slot on the remote instance when no permanent replication slot to use
has been configured (using <xref linkend="guc-primary-slot-name"/>).
The default is on. The only reason to turn this off would be if the
remote instance is currently out of available replication slots. This
parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line. Changes only take effect when the
WAL receiver process starts a new connection.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-wal-receiver-status-interval" xreflabel="wal_receiver_status_interval">
<term><varname>wal_receiver_status_interval</varname> (<type>integer</type>)
<indexterm>