sync_replication_slots
Fact — official short description: “Enables a physical standby to synchronize logical failover replication slots from the primary server.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG17 |
| Present in | PG17–19 Beta 3 |
| Removed in | No |
| Introduction commit | 93db6cbda037 — Add a new slot sync worker to synchronize logical slots. |
| Commit date | 2024-02-22 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG17–19 Beta 3 | off |
— | off |
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.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| 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. |
| OLAP | Large transactions and delayed standbys can increase synchronization lag. Monitor subscriber confirmed positions, standby replay, physical-slot retention, and catalog horizon together. |
| Small nodes | 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | true |
different | on |
| OLAP | true |
different | on |
| CRIT | true |
different | on |
| TINY | true |
different | on |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG17–19 Beta 3 = True (dcs); OLAP: PG17–19 Beta 3 = True (dcs); CRIT: PG17–19 Beta 3 = True (dcs); TINY: PG17–19 Beta 3 = True (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to prepare logical failover slots on physical standbys for controlled failover; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.
Common pitfalls
- 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.
Related parameters
primary_slot_name · hot_standby_feedback · primary_conninfo · synchronized_standby_slots · max_replication_slots · max_slot_wal_keep_size
References
- PostgreSQL 19 Beta 3 — sync_replication_slots
- PostgreSQL 19 release notes
- Machine-readable GUC export