| From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
|---|---|
| To: | vignesh C <vignesh21(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 22:19:38 |
| Message-ID: | CAHut+PuaM2BB34207YDkdr85neU1Xe2+QkYY3aDMUinFF=96gQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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.
======
Kind Regards,
Peter Smith.
Fujitsu Australia
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mohamed ALi | 2026-06-25 22:20:57 | Re: [PATCH] Improving Visibility of Temporary Table Usage |
| Previous Message | Chao Li | 2026-06-25 22:17:08 | Re: bytea(uuid) missing proleakproof? |