mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +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:
@@ -1969,6 +1969,15 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"wal_receiver_create_temp_slot", PGC_SIGHUP, REPLICATION_STANDBY,
|
||||
gettext_noop("Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured."),
|
||||
},
|
||||
&wal_receiver_create_temp_slot,
|
||||
true,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
/* End-of-list marker */
|
||||
{
|
||||
{NULL, 0, 0, NULL, NULL}, NULL, false, NULL, NULL, NULL
|
||||
|
||||
@@ -321,6 +321,7 @@
|
||||
#max_standby_streaming_delay = 30s # max delay before canceling queries
|
||||
# when reading streaming WAL;
|
||||
# -1 allows indefinite delay
|
||||
#wal_receiver_create_temp_slot = on # create temp slot if primary_slot_name not set
|
||||
#wal_receiver_status_interval = 10s # send replies at least this often
|
||||
# 0 disables
|
||||
#hot_standby_feedback = off # send info from standby to prevent
|
||||
|
||||
Reference in New Issue
Block a user