| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | Zhijie Hou <houzhijie22(at)gmail(dot)com> |
| Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Fix standby logical slot creation during dynamic logical decoding activation |
| Date: | 2026-11-24 22:24:28 |
| Message-ID: | CAD21AoD_52WbLXMFGr61Nm8HdOc6ArnCLsSDw51HvV5EF9=OhQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Nov 23, 2026 at 7:04 PM Zhijie Hou <houzhijie22(at)gmail(dot)com> wrote:
>
> Hi,
>
> On Tue, Nov24, 2026 at 03:24 AM Masahiko Sawada wrote:
> > On Sat, Nov 21, 2026 at 9:09 AM Zhijie Hou <houzhijie22(at)gmail(dot)com> wrote:
> >
> > > Attached is a patch to fix this by Holding
> > > LogicalDecodingControlLock in
> > > UpdateLogicalDecodingStatusEndOfRecovery() until the status-change
> > > record is written and recording its end LSN in
> > > last_replayed_enable_lsn when enabling logical decoding (alongside
> > > EnableLogicalDecoding() during replay), and clamping the reserved
> > > restart_lsn in ReplicationSlotReserveWal() to at least
> > > GetLogicalDecodingEnabledLSN() during recovery.
> >
> > The patch looks good to me.
> >
> > > And I kept the field name last_replayed_enable_lsn to keep diff
> > > minimal, though we could rename it (e.g., to last_enable_lsn) if
> > > others prefer since it now also records an end-of-recovery LSN.
> >
> > I prefer to rename it to last_enable_lsn. The record written at the
> > end of recovery is never replayed on that server, so "replayed"
> > doesn't fit anymore.
>
> Thanks for the comments. Here is updated patch that renamed this.
Thank you for updating the patch! I've pushed it.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2026-11-24 22:37:00 | Re: Include schema-qualified names in publication error messages (generalised to all of LR). |
| Previous Message | David Rowley | 2026-11-24 22:10:26 | Should we skip foreign key checks in binary upgrade mode? |