sync_replication_slots
Read PG 18 manual ↗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.
- Type
- bool
- Context
- sighup
- Measured default
- off
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
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.
Measured default history
| Version interval | Default |
|---|---|
| 17 – 19 | off |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
Enables the slotsync worker on a physical standby to copy logical failover-slot state from its primary. A configuration reload applies a new value.
Synchronization requires a physical replication slot between primary and standby (primary_slot_name on the standby), hot_standby_feedback=on, and primary_conninfo containing a valid dbname. The logical source slots must have failover enabled.
Slot state is copied asynchronously. The primary should list the standby’s physical slot in synchronized_standby_slots so subscribers cannot outrun the failover standby, and operators must verify that every required slot is synchronized and ready before promotion.
Operational considerations
Enabling it without primary_slot_name and therefore without the mandatory physical slot.
Leaving hot_standby_feedback off, which prevents safe catalog-row retention for synchronized logical slots.
Omitting dbname from primary_conninfo.
Synchronizing ordinary logical slots that were not created with failover enabled and expecting them to appear.
Promoting before checking that every required slot is synchronized and not behind its subscriber.
Workload guidance
OLAP: Large transactions and delayed standbys can increase synchronization lag. Monitor subscriber confirmed positions, standby replay, physical-slot retention, and catalog horizon together.
OLTP: Enable it only as part of a complete logical-failover design. Automate prerequisite checks and block planned promotion until all required failover slots report synchronized, non-conflicting state.
SMALL: Do not enable it merely because the switch is available. A small deployment still needs a permanent physical slot, hot_standby_feedback, dbname, retention limits, and a tested failover runbook.
Version history 1
- PG 16 → 17added
Related entries
Further reading
Definition snapshot: english-manuals:40d3e1193f8114dbeb51d0af9ef… · English manual source