Re: Incorrect logic in XLogNeedsFlush()

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Incorrect logic in XLogNeedsFlush()
Date: 2025-09-15 02:46:01
Message-ID: CAFiTN-sE1b_W8FSJxVxowoZhirqshwLHtWHuWwi+KJrZd2Nfqw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 14, 2025 at 11:23 PM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>
> On Sun, 2025-09-14 at 13:39 +0530, Dilip Kumar wrote:
> > I tried to improve it in v2
>
> Thank you. Looks good to me.

Thanks

> >
> > IMHO during crash recovery LocalMinRecoveryPoint and
> > ControlFile->minRecoveryPoint can not initialized until we replay all
> > WAL so those should never get accessed. However if XLogNeedsFlush()
> > were called during the end of the recovery checkpoint it was
> > accessing
> > this which was wrong although it was not a live bug and this patch is
> > making that more resilient.
>
> OK, so this will no longer be a concern after the patch (and not a live
> bug before, anyway).

That's my take, but I'd like to hear Melanie's thoughts on this point
as she raised this concern.

--
Regards,
Dilip Kumar
Google

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-09-15 02:51:53 Re: let ALTER COLUMN SET DATA TYPE cope with POLICY dependency
Previous Message Chao Li 2025-09-15 02:06:33 Re: Preferred use of macro GetPGProcByNumber