From 38c6b38fb36cca7ce9f2de0f787e3a3a8fec2b3b Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Thu, 2 Jul 2026 11:35:16 +0530 Subject: [PATCH v2] doc: Clarify sequence synchronization commands. Improve the REFRESH SEQUENCES description in ALTER SUBSCRIPTION to more accurately explain how it differs from REFRESH PUBLICATION: REFRESH PUBLICATION synchronizes the subscription's set of sequences with the publication (adding new and removing dropped sequences), whereas REFRESH SEQUENCES only re-synchronizes data for the currently subscribed sequences without changing which sequences are subscribed. Also advise running REFRESH PUBLICATION first when the publication's set of sequences has changed. In the "Replicating Sequences" section, note that CREATE SUBSCRIPTION uses copy_data = true (the default) to copy the initial sequence values, and link to the copy_data parameter. --- doc/src/sgml/logical-replication.sgml | 4 +++- doc/src/sgml/ref/alter_subscription.sgml | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index f21239af6b8..63935fa2eb3 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -1784,7 +1784,9 @@ Included in publications: use CREATE SUBSCRIPTION - to initially synchronize the published sequences. + with + copy_data = true (the default) to copy the + initial sequence values from the publisher. diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml index fad1f90956a..8d64744375a 100644 --- a/doc/src/sgml/ref/alter_subscription.sgml +++ b/doc/src/sgml/ref/alter_subscription.sgml @@ -237,11 +237,13 @@ ALTER SUBSCRIPTION name RENAME TO < Re-synchronize sequence data with the publisher. Unlike - ALTER SUBSCRIPTION ... REFRESH PUBLICATION which - only has the ability to synchronize newly added sequences, + ALTER SUBSCRIPTION ... REFRESH PUBLICATION, + which synchronizes the subscription's set of sequences with the + publication (adding new and removing dropped sequences), REFRESH SEQUENCES will re-synchronize the sequence - data for all currently subscribed sequences. It does not add or remove - sequences from the subscription to match the publication. + data for all currently subscribed sequences without changing which + sequences are subscribed. Run REFRESH PUBLICATION + first if the publication's set of sequences has changed. See for -- 2.54.0