From 19fbb47ef6854b1e3a7311ed2f4e765426e7a611 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Thu, 9 Jul 2026 08:01:38 +0530 Subject: [PATCH] Doc: Clarify sequence synchronization commands. Explain more accurately how REFRESH SEQUENCES differs from REFRESH PUBLICATION in ALTER SUBSCRIPTION, and note that CREATE SUBSCRIPTION uses copy_data = true (the default) to copy initial sequence values. Author: Peter Smith Author: Amit Kapila Backpatch-through: 19 Discussion: https://postgr.es/m/CAHut+PtFkGvZNihGRDoghWNKMfJufEpR9+thbG_8qPQ7RyVN4w@mail.gmail.com --- 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 d7d75b7c9a5..2edf65af66e 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -1769,7 +1769,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 e4f0b6b16c7..51081ef369e 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