Re: Incorrect logic in XLogNeedsFlush() - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Incorrect logic in XLogNeedsFlush()
Date
Msg-id 7656c3fb4fbfba1ffd0df713fa8054d268105754.camel@j-davis.com
Whole thread Raw
In response to Re: Incorrect logic in XLogNeedsFlush()  (Dilip Kumar <dilipbalaut@gmail.com>)
List 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




pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: PostgreSQL 18 GA press release draft
Next
From: Tom Lane
Date:
Subject: Re: Allow tests to pass in OpenSSL FIPS mode