]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Doc: Clarify sequence synchronization commands.
authorAmit Kapila <akapila@postgresql.org>
Thu, 9 Jul 2026 02:31:38 +0000 (08:01 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 9 Jul 2026 02:55:10 +0000 (08:25 +0530)
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
doc/src/sgml/ref/alter_subscription.sgml

index d7d75b7c9a506f7269f5ffa3429e4e88c718990b..2edf65af66e617a16d85cea803474ebc7c0f9431 100644 (file)
@@ -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>
index e4f0b6b16c7db7c8303c6640203de73867b9ceb6..51081ef369ec3c872b98b39a166cba848e7ed72c 100644 (file)
@@ -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