public inbox for [email protected]help / color / mirror / Atom feed
DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true 4+ messages / 2 participants [nested] [flat]
* DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true @ 2026-06-25 00:51 Peter Smith <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Peter Smith @ 2026-06-25 00:51 UTC (permalink / raw) To: PostgreSQL Hackers <[email protected]>; vignesh C <[email protected]> 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 ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true @ 2026-06-25 06:37 vignesh C <[email protected]> parent: Peter Smith <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: vignesh C @ 2026-06-25 06:37 UTC (permalink / raw) To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> On Thu, 25 Jun 2026 at 06:22, Peter Smith <[email protected]> wrote: > > 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. Let's include this to avoid confusion. Few comments: 1) There should be a space after </link>: + use <link linkend="sql-createsubscription-params-with-copy-data"> + <command>CREATE SUBSCRIPTION ... WITH (copy_data = true)</command> + </link>to initially synchronize the published sequences. 2) copy_data = true is the default, so it may mislead users into thinking they must explicitly specify it. How about changing it to: use CREATE SUBSCRIPTION with the default copy_data = true behavior to initially synchronize the published sequences. Regards, Vignesh ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true @ 2026-06-25 22:49 Peter Smith <[email protected]> parent: vignesh C <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Peter Smith @ 2026-06-25 22:49 UTC (permalink / raw) To: vignesh C <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> Hi Vignesh. Thanks for reviewing! PSA v2 worded slightly differently to mention the copy_data default. ====== Kind Regards, Peter Smith. Fujitsu Australia Attachments: [application/octet-stream] v2-0001-DOCS-clarify-copy_data-is-needed-to-synchronise-s.patch (1.0K, ../../CAHut+PtOkYeHd6vkA4ZOvMj9E1ZJVVQ_XJbRmJviTYowVPh6zw@mail.gmail.com/2-v2-0001-DOCS-clarify-copy_data-is-needed-to-synchronise-s.patch) download | inline diff: From ac68db98a923d629d02401acd47226839e7ce5fa Mon Sep 17 00:00:00 2001 From: Peter Smith <[email protected]> Date: Fri, 26 Jun 2026 10:43:41 +1200 Subject: [PATCH v2] DOCS - clarify copy_data is needed to synchronise sequences --- doc/src/sgml/logical-replication.sgml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 9e7868487de..71405259d03 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> -- 2.47.3 ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true @ 2026-06-29 06:57 vignesh C <[email protected]> parent: Peter Smith <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: vignesh C @ 2026-06-29 06:57 UTC (permalink / raw) To: Peter Smith <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]> Thanks for the updated version. This version looks good to me. Regards, Vignesh On Fri, 26 Jun 2026 at 04:20, Peter Smith <[email protected]> wrote: > > Hi Vignesh. > > Thanks for reviewing! > > PSA v2 worded slightly differently to mention the copy_data default. > > ====== > Kind Regards, > Peter Smith. > Fujitsu Australia ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-06-29 06:57 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-06-25 00:51 DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true Peter Smith <[email protected]> 2026-06-25 06:37 ` vignesh C <[email protected]> 2026-06-25 22:49 ` Peter Smith <[email protected]> 2026-06-29 06:57 ` vignesh C <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox