DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true

Started by Peter Smithabout 1 month ago5 messageshackers
Jump to latest
#1Peter Smith
smithpb2250@gmail.com

While reviewing another patch I referred to the information of "29.7.
Replicating Sequences #" [1]https://www.postgresql.org/docs/19/logical-replication-sequences.html 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:

v1-0001-DOCS-clarify-copy_data-is-needed-to-synchronise-s.patchapplication/octet-stream; name=v1-0001-DOCS-clarify-copy_data-is-needed-to-synchronise-s.patchDownload+3-3
#2vignesh C
vignesh21@gmail.com
In reply to: Peter Smith (#1)
Re: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true

On Thu, 25 Jun 2026 at 06:22, Peter Smith <smithpb2250@gmail.com> 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

#3Peter Smith
smithpb2250@gmail.com
In reply to: vignesh C (#2)
Re: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true

Hi Vignesh.

Thanks for reviewing!

PSA v2 worded slightly differently to mention the copy_data default.

======
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachments:

v2-0001-DOCS-clarify-copy_data-is-needed-to-synchronise-s.patchapplication/octet-stream; name=v2-0001-DOCS-clarify-copy_data-is-needed-to-synchronise-s.patchDownload+3-2
#4vignesh C
vignesh21@gmail.com
In reply to: Peter Smith (#3)
Re: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true

Thanks for the updated version. This version looks good to me.

Regards,
Vignesh

Show quoted text

On Fri, 26 Jun 2026 at 04:20, Peter Smith <smithpb2250@gmail.com> wrote:

Hi Vignesh.

Thanks for reviewing!

PSA v2 worded slightly differently to mention the copy_data default.

======
Kind Regards,
Peter Smith.
Fujitsu Australia

#5Peter Smith
smithpb2250@gmail.com
In reply to: vignesh C (#4)
Re: DOCS - clarify CREATE SUBSCRIPTION only synchronizes sequences when copy_data=true

This docs patch was combined with a similar one and has now been pushed [1]/messages/by-id/E1wheve-000Epy-38@gemulon.postgresql.org.

I have closed the CF entry.

======
[1]: /messages/by-id/E1wheve-000Epy-38@gemulon.postgresql.org

Kind Regards
Peter Smith.
Fujitsu Australia