Re: Logical Replication of sequences

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Euler Taveira <euler(at)eulerto(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Subject: Re: Logical Replication of sequences
Date: 2025-05-03 13:57:36
Message-ID: CALDaNm184jrhLLYFdzTbjFbgttkVeEEGx4UERoApJH_PZFDCFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 1 May 2025 at 08:46, vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Tue, 29 Apr 2025 at 06:15, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > Hi Vignesh.
> >
> > Some trivial review comments for DOCS patch v20250428-0005.
> >
> > ======
> > doc/src/sgml/logical-replication.sgml
> >
> > 1.
> > + Publications may currently only contain tables or sequences. Objects must be
> > + added explicitly, except when a publication is created using
> > + <literal>FOR TABLES IN SCHEMA</literal>, or <literal>FOR ALL
> > TABLES</literal>,
> > + or <literal>FOR ALL SEQUENCES</literal>. Unlike tables, the current state of
> > + sequences may be synchronised at any time. For more information, refer to
> > + <xref linkend="logical-replication-sequences"/>.
> > </para>
> >
> > AFAIK the PostgreSQL documentation uses US spelling:
> >
> > /synchronised/synchronized/
> >
> > ~~~
> >
> > 2.
> > + Incremental sequence changes are not replicated. Although the data in
> > + serial or identity columns backed by sequences will of course be
> > + replicated as part of the table, the sequences themselves do not replicate
> > + ongoing changes. On the subscriber, a sequence will retain the last value
> >
> > I didn't think that you needed to say "of course" here.
>
> Thanks for the comments, the updated patch has the changes for the same.

There was one pending open comment #6 from [1]. This has been
addressed in the attached patch.
[1] - https://www.postgresql.org/message-id/OSCPR01MB14966DA8CB749A0D4E9F3F7A7F50E2%40OSCPR01MB14966.jpnprd01.prod.outlook.com

Regards,
Vignesh

Attachment Content-Type Size
v20250503-0001-Introduce-pg_sequence_state-function-for-e.patch text/x-patch 6.7 KB
v20250503-0003-Reorganize-tablesync-Code-and-Introduce-sy.patch text/x-patch 23.0 KB
v20250503-0002-Introduce-ALL-SEQUENCES-support-for-Postgr.patch text/x-patch 106.5 KB
v20250503-0004-Enhance-sequence-synchronization-during-su.patch text/x-patch 101.3 KB
v20250503-0005-Documentation-for-sequence-synchronization.patch text/x-patch 26.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2025-05-03 14:42:08 Re: Make COPY format extendable: Extract COPY TO format implementations
Previous Message Alvaro Herrera 2025-05-03 13:09:23 Re: Issue attaching a table to a partitioned table with an auto-referenced foreign key