Parameter · Replication / Primary Server
synchronized_standby_slots
Lists streaming replication standby server replication slot names that logical WAL sender processes will wait for. Logical WAL sender processes will send decoded changes to output plugins only after the specified replication slots have confirmed receiving WAL.
- Default:
'' (empty) - Type: string
- Applies: Reload
In plain words
With logical replication failover (PostgreSQL 17+), a standby keeps copies of the primary's logical slots so subscribers can continue after a failover. But if a subscriber received a change the standby never got, it would be ahead of the new primary after failover. synchronized_standby_slots lists the physical slots of the standbys that must confirm WAL before logical changes are sent to subscribers.
For DBAs and operators
Logical walsenders for slots with failover = true hold back decoded changes until every listed physical slot has confirmed receiving the corresponding WAL. The same wait applies to pg_logical_slot_get_changes(), pg_logical_slot_peek_changes() and pg_replication_slot_advance() on failover slots.
Each standby behind a listed slot should have sync_replication_slots on. If a listed slot is missing, or the standby is down for long, logical replication stops: walsenders wait and log, e.g.
WARNING: replication slot "sb1_slot" specified in parameter "synchronized_standby_slots" does not have active_pid
WARNING: physical replication slot "sb1_slot" specified in parameter "synchronized_standby_slots" has been invalidated
So remove a decommissioned standby's slot from this list before dropping the slot. Only physical slots are allowed. Empty (default) means no waiting.
How to change it
Change in postgresql.conf or ALTER SYSTEM, then run SELECT pg_reload_conf().
See it in context
Logical replication Replication slots Synchronous replication WAL sender
Related parameters
sync_replication_slots primary_slot_name hot_standby_feedback synchronous_standby_names