| 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-29 08:49:06 |
| Message-ID: | CALDaNm3Kh83ufGbgJqc8Frn=UvqC3LAd43eKS=FRuEWaRxbp4w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, 26 Jun 2026 at 03:50, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> Some review comments for v3.
>
> ======
> doc/src/sgml/ref/pg_createsubscriber.sgml
>
> 1.
> <para>
> <application>pg_createsubscriber</application> creates a new logical
> replica from a physical standby server. All tables in the specified
> - database are included in the <link linkend="logical-replication">logical
> - replication</link> setup. A pair of
> - publication and subscription objects are created for each database. It
> - must be run at the target server.
> + database are included in the
> + <link linkend="logical-replication">logical replication</link> setup. The
> + publications created by <application>pg_createsubscriber</application> also
> + include all sequences, allowing their state to be synchronized after the
> + upgrade. A pair of publication and subscription objects are created for each
> + database. It must be run at the target server.
> </para>
>
> This is not properly distinguishing between the internal publications
> versus user-nominated publications. I think it needs to clarify
> up-front that all of this "Description" part is really only talking
> about the (default) behaviour of using the *internally* generated FOR
> ALL TABLES, ALL SEQUENCE publications.
>
> e.g. "All tables in the specified database are included" ... that
> might not be true for user pubs.
> e.g. "A pair of publication and subscription objects are created" ...
> not for user pubs; they already exist.
>
> ~~~
>
> 2.
> 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.
> + which ensures each table is brought up to a synchronized state. The
> + subscriptions are configured to include sequences, but sequence values are
> + not synchronized automatically.
>
> Similar here.
>
> "The subscriptions are configured to include sequences" may not be
> true for the case of user-specified pubs. Also, (from my previous
> review), subscriptions are not really "configured" to include
> sequences -- if they subscribe to sequences, that is only because
> their associated publication is publishing sequences.
>
Thanks for the comments, here is an updated version with the fixes for the same.
Regards,
Vignesh
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-Include-sequences-in-publications-created-by-pg_c.patch | application/octet-stream | 8.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | shveta malik | 2026-06-29 08:51:38 | Re: Proposal: Conflict log history table for Logical Replication |
| Previous Message | jian he | 2026-06-29 08:47:58 | Re: implement CAST(expr AS type FORMAT 'template') |