postgres.git / summary / log / commit / refs
commit 19fbb47ef6854b1e3a7311ed2f4e765426e7a611
Author: Amit Kapila <akapila@postgresql.org>
Date: Thu Jul 09 02:31:38 2026 +0000
First released in: 19.0
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 <smithpb2250@gmail.com>
Author: Amit Kapila <amit.kapila16@gmail.com>
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:
<listitem>
<para>
use <link linkend="sql-createsubscription"><command>CREATE SUBSCRIPTION</command></link>
- to initially synchronize the published sequences.
+ with <link linkend="sql-createsubscription-params-with-copy-data">
+ <literal>copy_data = true</literal></link> (the default) to copy the
+ initial sequence values from the publisher.
</para>
</listitem>
<listitem>
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 <replaceable class="parameter">name</replaceable> RENAME TO <
<para>
Re-synchronize sequence data with the publisher. Unlike
<link linkend="sql-altersubscription-params-refresh-publication">
- <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link> which
- only has the ability to synchronize newly added sequences,
+ <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link>,
+ which synchronizes the subscription's set of sequences with the
+ publication (adding new and removing dropped sequences),
<literal>REFRESH SEQUENCES</literal> 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 <literal>REFRESH PUBLICATION</literal>
+ first if the publication's set of sequences has changed.
</para>
<para>
See <xref linkend="sequence-definition-mismatches"/> for
[parent: dff11f846c4b]