From: Amit Kapila Date: Thu, 9 Jul 2026 02:39:07 +0000 (+0530) Subject: Doc: Clarify sequence synchronization commands. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1702cb513634878425e8b3f49dc1894d2aa781e;p=thirdparty%2Fpostgresql.git 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 --- diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 3b22ee229b9..690598bff98 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