Re: Newly created replication slot may be invalidated by checkpoint

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Vitaly Davydov <v(dot)davydov(at)postgrespro(dot)ru>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "suyu(dot)cmj" <mengjuan(dot)cmj(at)alibaba-inc(dot)com>, tomas <tomas(at)vondra(dot)me>, michael <michael(at)paquier(dot)xyz>, "bharath(dot)rupireddyforpostgres" <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Subject: Re: Newly created replication slot may be invalidated by checkpoint
Date: 2025-12-08 09:46:54
Message-ID: CAA4eK1+jz8tM1=o6JGpBpgXwfo-eGZ==wWaQYd4RZ7eFXYwtoQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 8, 2025 at 12:53 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Fri, Dec 5, 2025 at 4:10 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Thu, Dec 4, 2025 at 12:12 PM Zhijie Hou (Fujitsu)
> > <houzj(dot)fnst(at)fujitsu(dot)com> wrote:
> > >
> > > Here are the updated patches for HEAD and 18. I did not add tests since, after
> > > applying the patch and resolving the issue, the only observable behavior is that
> > > the checkpoint will wait for another backend to create a slot due to the lwlock
> > > lock, so it seems not worth to test solely lwlock wait event (I could not find similar
> > > tests).
> > >
> >
> > Fair enough. The patch looks mostly good to me, attached are minor
> > comment improvements atop the HEAD patch. I'll do some more testing
> > before push.
> >
> > Sawada-san/Vitaly, do you have any opinion on patch or the direction
> > to fix? The idea is to get this fixed for HEAD and 18, then continue
> > discussion for other bank-branches and the remaining patches.
>
> +1
>

Thanks, Pushed. I'll continue thinking on how to fix it in branches
prior to 18 and other problems reported in this thread.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2025-12-08 09:51:36 Re: Adding REPACK [concurrently]
Previous Message Daniel Gustafsson 2025-12-08 09:43:18 Re: Enhancing Memory Context Statistics Reporting