It enables a physical standby to synchronize logical failover slots from the primary server so that logical subscribers can resume replication from the new primary server after failover.
At a glance
| Property | Value |
|---|---|
| Parameter | sync_replication_slots |
| Category | Replication |
| Default | off |
| Value type | boolean (on/off) |
| Change scope | Reload (postgresql.conf, SIGHUP) |
| Available in | PostgreSQL 17, 18, 19 (added in 17) |
What it does
It enables a physical standby to synchronize logical failover slots from the primary server so that logical subscribers can resume replication from the new primary server after failover.
It is disabled by default. This parameter can only be set in the postgresql.conf file or on the server command line.
(Description quoted from the official PostgreSQL documentation.)
How to apply a change
Set it in postgresql.conf (or with ALTER SYSTEM) and reload with SELECT pg_reload_conf(); or pg_ctl reload — no restart needed.
Inspect the current value and source with SHOW sync_replication_slots; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'sync_replication_slots';.
Tuning guidance
Enable it on a standby (with the supporting GUCs) so logical slots are synced from the primary and survive failover; it only helps if you run logical replication and want it to continue after promotion.