Re: [PATCH] Support automatic sequence replication

From: shveta malik <shveta(dot)malik(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com>
Subject: Re: [PATCH] Support automatic sequence replication
Date: 2026-03-13 10:41:15
Message-ID: CAJpy0uDGQm1wXQBfs3Ph+Fqhk1Y0MxkdBCoismg+LDoXB7PyBQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 13, 2026 at 12:43 PM Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Monday, March 9, 2026 11:13 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> >
> > No major concerns on 001, just a few trivial things. Do these only if you feel
> > okay about these.
> >
>
> Thanks for the reviews. I've updated the patch set addressing all comments.
>

Thanks Hou-San. Please find my concerns on 001:

1)
Consider a case where the page LSN has changed and the sequence has
drifted, but the page LSN was not updated because the update interval
had not yet elapsed. Later, if there is no further drift for a couple
of minutes, we may continue invoking copy_sequence with update_lsn =
true. However, since check_seq_privileges_and_drift() keeps returning
no drift, the LSN might never get updated.

2)
Also, IIUC, we will end up advancing 'next_lsn_update' based on
'update_lsn' even though no actual lsn-update has occurred. As a
result, the next page LSN update may never happen if the update_lsn =
true cases always coincide with the no-drift case.

Shall copy_sequence() call UpdateSubscriptionRelState() even if there
is no drift but need_lsn_update is true?

thanks
Shveta

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-03-13 10:42:43 Re: Areas for Solaris support modernization
Previous Message Viktor Holmberg 2026-03-13 10:17:43 Re: support fast default for domain with constraints