Re: Incorrect logic in XLogNeedsFlush()

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Dilip Kumar <dilipbalaut(at)gmail(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-14 17:53:07
Message-ID: 7656c3fb4fbfba1ffd0df713fa8054d268105754.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

>
> 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).

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-09-14 19:02:15 Re: Allow tests to pass in OpenSSL FIPS mode
Previous Message Jeff Davis 2025-09-14 17:08:49 Re: PostgreSQL 18 GA press release draft