DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Replication / Standby Servers

wal_receiver_create_temp_slot

Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured.

  • Default: off
  • Type: bool
  • Applies: Reload

In plain words

If a standby has no permanent replication slot configured, turning this on makes its WAL receiver create a temporary slot on the primary for the duration of the connection. While connected, the primary then keeps the WAL this standby still needs. When the connection ends, the slot disappears.

For DBAs and operators

The temporary slot protects against the standby falling behind while streaming (for example during a heavy batch), but not across disconnects: the slot is dropped when the WAL receiver exits, so after an outage the standby may still find its WAL removed. Ignored when primary_slot_name is set. Changing it restarts the WAL receiver. Available since PostgreSQL 13.

The temporary slot appears in pg_replication_slots with temporary = true and a generated name such as pg_walreceiver_12345; it counts against max_replication_slots on the primary and cannot be used as a failover slot.

Useful when you cannot create slots on the primary beforehand (e.g. automation that rebuilds standbys); for long-lived standbys, a permanent slot plus max_slot_wal_keep_size is better.

How to change it

Change in postgresql.conf or ALTER SYSTEM, then run SELECT pg_reload_conf().

See it in context

Replication slots WAL receiver

Related parameters

primary_slot_name wal_keep_size max_replication_slots

All Replication parameters