| From: | vignesh C <vignesh21(at)gmail(dot)com> |
|---|---|
| To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Include sequences in publications created by pg_createsubscriber |
| Date: | 2026-06-25 10:00:20 |
| Message-ID: | CALDaNm39kG3iweFqyS0=3UNOSzZn_13Cq5iEKqcyG7apXGPJbw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, 25 Jun 2026 at 06:29, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Hi Vignesh.
>
> Some comments for v2.
>
> ======
> doc/src/sgml/ref/pg_createsubscriber.sgml
>
> 1.
> fresh logical replication setup. The main difference between the logical
> replication setup and <application>pg_createsubscriber</application> is how
> the data synchronization is done.
> <application>pg_createsubscriber</application>
> - does not copy the initial table data. It does only the
> synchronization phase,
> - which ensures each table is brought up to a synchronized state.
> + does not copy the initial table or sequence data. It does only the
> + synchronization phase, which ensures each table and sequence is brought up
> + to a synchronized state.
>
> 1a.
> OK. Thanks for the explanation on what was meant. Personally, I found
> the wording "sequence is brought up to a synchronized state"
> ambiguous, because in my mind the sequence value is a part of the
> sequence state.
>
> Below is some alternate wording for consideration:
>
> SUGGESTION:
> pg_createsubscriber performs only the synchronization phase, which
> prepares each table and sequence for replication. It does not copy
> table data or synchronize sequence values from the publisher.
I have separated the table and sequence part to avoid confusion.
> ~~~
>
> 1b.
> While reviewing this patch I also referred to section "29.7.
> Replicating Sequences #". [1] for more information. But there I was
> tricked by some (misleading?) wording.
> I have created another thread [2] to discuss/patch that. Please see it
> and post your thoughts.
Thanks for working on this, I have shared a couple of comments at [1].
> ~~~
>
> 2.
> + <para>
> + Note that although the publication includes sequences, sequence value
> + changes made on the publisher after reaching consistent point are not
> + synchronized incrementally. To synchronize sequence values, run
> + <link linkend="sql-altersubscription-params-refresh-sequences">
> + <command>ALTER SUBSCRIPTION ... REFRESH SEQUENCES</command></link>, which
> + fetches the current sequence state from the publisher and advances the
> + corresponding subscriber sequences.
> </para>
>
> I wonder if the last sentence is overly descriptive. Isn't it enough
> to just say:
> To synchronize sequence values, run <link
> linkend="sql-altersubscription-params-refresh-sequences"><command>ALTER
> SUBSCRIPTION ... REFRESH SEQUENCES</command></link>.
Modified
> ~~~
>
> 3.
> <para>
> Enable the subscription for each specified database on the target server.
> The subscription starts applying transactions from the replication start
> - point.
> + point. The subscription is configured to include sequences.
> </para>
>
> This implies there was some special subscription "configuration" for
> getting sequences, but it just gets sequences because sequences were
> published. Maybe you don't need to say anything here. Or, maybe reword
> to just say "The subscription will include sequences".
I have removed it from here and clarified this in step-3.
The attached v3 version patch has the changes for the same.
Regards,
Vignesh
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Include-sequences-in-publications-created-by-pg_c.patch | application/octet-stream | 7.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Borodin | 2026-06-25 10:14:46 | Re: Out-of-Cycle release? (was Re: BUG #19490: Streaming standby on 16.14 stops applying WAL on MultiXactOffsetSLRU when primary is 16.8) |
| Previous Message | Jehan-Guillaume de Rorthais | 2026-06-25 09:48:49 | [BUG] ECPG crash with union type |