{"Entry":{"collection":"guc","key":"sync_replication_slots","name":"sync_replication_slots","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Replication / Standby Servers","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"16","status":"added","to":"17"}],"content_hash":"7e48964895466a5f7e309327a51e99a7b8fe29770f66007563b262c7a8b70d0a","context":"","default_changed_in":[],"default_history":[{"from":"17","to":"19","value":"off"}],"editorial":{"advice":{"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."},"mechanism":["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."],"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."],"references":[{"title":"PostgreSQL 19 Beta 4: sync_replication_slots","url":"https://www.postgresql.org/docs/19/runtime-config-replication.html#GUC-SYNC-REPLICATION-SLOTS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["primary_slot_name","hot_standby_feedback","primary_conninfo","synchronized_standby_slots","max_replication_slots","max_slot_wal_keep_size"],"summary":"sync_replication_slots enables a physical standby to synchronize logical failover replication slots from the primary server. It is a sighup setting present in PG17–18; the latest recorded boot default is off."},"enumvals":[],"first_version":"17","group":"Replication","group_slug":"replication","imported_at":"2026-09-27T17:57:32.087832+08:00","intro_commit":{"authored_at":"2024-02-22T15:25:15+05:30","discussion":["https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com"],"hash":"93db6cbda037f1be9544932bd9a785dabf3ff712","subject":"Add a new slot sync worker to synchronize logical slots.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=93db6cbda037f1be9544932bd9a785dabf3ff712"},"key":"sync_replication_slots","last_version":"20","max_val":"","min_val":"","name":"sync_replication_slots","position":396,"present_in":["17","18","19","20"],"short_desc":"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.","short_desc_zh":"","source_rev":"english-manuals:c9ef1f0ecb16d760bee7af705c22116fe21f6f756b16483c2d098bbee510c78c","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"sync_replication_slots","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"sync_replication_slots","SourceRevision":"english-manuals:c9ef1f0ecb16d760bee7af705c22116fe21f6f756b16483c2d098bbee510c78c","Facts":{"boot_val":"off","category":"Replication / Standby Servers","context":"sighup","description":"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.","doc":{"anchor":"GUC-SYNC-REPLICATION-SLOTS","file":"runtime-config-replication.html","lang":"en","sha256":"c78480a202f8579e2655e080060afe4859c9eb26a16318fb9099dabb178fb32d","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"sync_replication_slots","short_desc":"Enables a physical standby to synchronize logical failover replication slots from the primary server.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-SYNC-REPLICATION-SLOTS","file":"runtime-config-replication.html","lang":"en","sha256":"c78480a202f8579e2655e080060afe4859c9eb26a16318fb9099dabb178fb32d","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"sync_replication_slots","SourceDatabase":"center","Version":"18","Locale":"en","Title":"sync_replication_slots","Summary":"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.","BodyHTML":"\u003cp\u003eIt 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.\u003c/p\u003e","SourceRevision":"english-manuals:c9ef1f0ecb16d760bee7af705c22116fe21f6f756b16483c2d098bbee510c78c","ContentHash":"288362b47e26ea31be3a1ff42daba7ecfb34f884386ec6816c10850beb783c3c","Payload":{"description":"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."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
