From c62d15d4127308fce79ec27ae30fe9ccc59a6132 Mon Sep 17 00:00:00 2001 From: Shveta Malik Date: Mon, 6 Oct 2025 11:34:04 +0530 Subject: [PATCH] Doc update --- doc/src/sgml/logicaldecoding.sgml | 33 +++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml index 504c79f2fd2..b964937d509 100644 --- a/doc/src/sgml/logicaldecoding.sgml +++ b/doc/src/sgml/logicaldecoding.sgml @@ -370,16 +370,12 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU pg_create_logical_replication_slot, or by using the failover option of - CREATE SUBSCRIPTION during slot creation. After that, - synchronization can be performed either manually by calling - - pg_sync_replication_slots - on the standby, or automatically by enabling - - sync_replication_slots on the standby. - When - sync_replication_slots is enabled - on the standby, the failover slots are periodically synchronized by + CREATE SUBSCRIPTION during slot creation. + Additionally, enabling + sync_replication_slots on the standby + is required. By enabling + sync_replication_slots + on the standby, the failover slots can be synchronized periodically in the slotsync worker. For the synchronization to work, it is mandatory to have a physical replication slot between the primary and the standby (i.e., primary_slot_name @@ -402,6 +398,23 @@ postgres=# select * from pg_logical_slot_get_changes('regression_slot', NULL, NU receiving the WAL up to the latest flushed position on the primary server. + + + While enabling + sync_replication_slots allows for automatic + periodic synchronization of failover slots, they can also be manually + synchronized using the + pg_sync_replication_slots function on the standby. + However, unlike automatic synchronization, it does not perform incremental + updates. It retries cyclically to some extent—continuing until all + the failover slots that existed on primary at the start of the function + call are synchronized. Any slots created after the function begins will + not be synchronized. In contrast, automatic synchronization + via sync_replication_slots provides continuous slot + updates, enabling seamless failover and supporting high availability. + + + When slot synchronization is configured as recommended, and the initial synchronization is performed either automatically or -- 2.34.1