Configuration parameter

synchronized_standby_slots — PostgreSQL configuration parameter

Category Replication

A comma-separated list of streaming replication standby server slot names that logical WAL sender processes will wait for.

At a glance

Property Value
Parameter synchronized_standby_slots
Category Replication
Default (see documentation)
Value type string
Change scope Per-session (SET)
Available in PostgreSQL 17, 18, 19 (added in 17)

What it does

A comma-separated list of streaming replication standby server slot names that logical WAL sender processes will wait for. Logical WAL sender processes will send decoded changes to plugins only after the specified replication slots confirm receiving WAL. This guarantees that logical replication failover slots do not consume changes until those changes are received and flushed to corresponding physical standbys. If a logical replication connection is meant to switch to a physical standby after the standby is promoted, the physical replication slot for the standby should be listed here. Note that logical replication will not proceed if the slots specified in the synchronized_standby_slots do not exist or are invalidated. Additionally, the replication management functions pg_replication_slot_advance, pg_logical_slot_get_changes, and pg_logical_slot_peek_changes, when used with logical failover slots, will block until all physical slots specified in synchronized_standby_slots have confirmed WAL receipt.

The standbys corresponding to the physical replication slots in synchronized_standby_slots must configure sync_replication_slots = true so they can receive logical failover slot changes from the primary.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.

Inspect the current value and source with SHOW synchronized_standby_slots; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'synchronized_standby_slots';.

Tuning guidance

List the physical slots that must receive WAL before logical walsenders advance, so a logical subscriber cannot get ahead of a failover-target standby. Set it when combining logical replication with failover slots.

Reference

PostgreSQL documentation — synchronized_standby_slots.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters