Re: Include sequences in publications created by pg_createsubscriber

From: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Include sequences in publications created by pg_createsubscriber
Date: 2026-07-13 05:37:37
Message-ID: CANhcyEU7xTREtj4F0NX1gG-66j8t6xcZ5j5Pv4jfsBtKBMdsBQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Thanks for the comments, the attached v9 version patch has the changes
> for the same.
>
Hi Vignesh,

I tested and verified the patch.
It looks good to me.

I have a minor comment:

Currently the following line is added at the end paragraph.
+ To synchronize sequence values, run
+ <link linkend="sql-altersubscription-params-refresh-sequences">
+ <command>ALTER SUBSCRIPTION ... REFRESH SEQUENCES</command></link> on each
+ subscription at the target server.

I think this line looks good along with the para which mentions about
the 'all sequence publication':
+ which ensures each table is brought up to a synchronized state. Internally
+ generated publications include all sequences in the database, but their
+ values are not automatically synchronized. For user-specified publications,
+ sequences are only replicated if they were explicitly added to those
+ publications prior to running the tool, and as with the default mode,
+ sequence values must be manually synchronized when needed.

It explains why we need to manually synchronize the sequences then we
provide the command which we can use to synchronize. Thoughts?

This is just a suggestion. I'm fine with either version.

Thanks
Shlok Kyal

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-07-13 05:37:54 Re: sequencesync worker race with REFRESH SEQUENCES
Previous Message Amit Kapila 2026-07-13 04:43:43 Re: sequencesync worker race with REFRESH SEQUENCES