public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Smith <[email protected]>
To: PostgreSQL Hackers <[email protected]>
To: vignesh C <[email protected]>
Subject: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true
Date: Thu, 25 Jun 2026 12:51:44 +1200
Message-ID: <CAHut+PsrVntfrJ8gV45+6=1bs5dTWD5mU7Q6aKrBnf1vmyZQkQ@mail.gmail.com> (raw)

While reviewing another patch I referred to the information of "29.7.
Replicating Sequences #" [1] which says:
"use CREATE SUBSCRIPTION to initially synchronize the published sequences."

AFAIK, that is not entirely correct -- synchronisation of sequences
happens only when the "copy_data" option is true. Although copy_data
default is true, the original text was misleading. Anyway, it misled
me.

PSA a patch to clarify that "copy_data = true" is needed.

======
[1] https://www.postgresql.org/docs/19/logical-replication-sequences.html

Kind Regards,
Peter Smith.
Fujitsu Australia


Attachments:

  [application/octet-stream] v1-0001-DOCS-clarify-copy_data-is-needed-to-synchronise-s.patch (1.1K, ../CAHut+PsrVntfrJ8gV45+6=1bs5dTWD5mU7Q6aKrBnf1vmyZQkQ@mail.gmail.com/2-v1-0001-DOCS-clarify-copy_data-is-needed-to-synchronise-s.patch)
  download | inline diff:
From 2f24c66cb8fdaa0d44aeaba1437ef1f123c70a96 Mon Sep 17 00:00:00 2001
From: Peter Smith <[email protected]>
Date: Thu, 25 Jun 2026 12:44:18 +1200
Subject: [PATCH v1] DOCS - clarify copy_data is needed to synchronise
 sequences

---
 doc/src/sgml/logical-replication.sgml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index 9e7868487de..c1721ba11b6 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -1768,8 +1768,9 @@ Included in publications:
    <itemizedlist>
     <listitem>
      <para>
-      use <link linkend="sql-createsubscription"><command>CREATE SUBSCRIPTION</command></link>
-      to initially synchronize the published sequences.
+      use <link linkend="sql-createsubscription-params-with-copy-data">
+      <command>CREATE SUBSCRIPTION ... WITH (copy_data = true)</command>
+      </link>to initially synchronize the published sequences.
      </para>
     </listitem>
     <listitem>
-- 
2.47.3



view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true
  In-Reply-To: <CAHut+PsrVntfrJ8gV45+6=1bs5dTWD5mU7Q6aKrBnf1vmyZQkQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox