Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles
Date
Msg-id CAFiTN-tyzLF5V8ksS1WCs1-ax3kbmXjtuoSa=8WqTe95aCwPhQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Tue, Sep 9, 2025 at 1:23 PM Fujii Masao <masao.fujii@gmail.com> wrote:
>
> On Mon, Sep 8, 2025 at 6:33 PM Nitin Motiani <nitinmotiani@google.com> wrote:
> >
> > Hi Hackers,
> >
> > I'd like to propose a patch to allow accepting connections post recovery without waiting for the removal of old
xlogfiles. 
>
> As another idea, could crash recovery avoid waiting for the end-of-recovery
> checkpoint itself to finish, similar to archive recovery? In other words,
> crash recovery would write the end-of-recovery WAL record and request
> a checkpoint, but not block until it completes. Thought?

Thanks for your input Fujii.  The end-of-recovery checkpoint needs to
set checkpoint.redo to serve as a new recovery starting point. This
prevents a full recovery from the previous checkpoint in the event of
a crash. However, setting checkpoint.redo requires that no other
backend is generating concurrent WAL. For this reason, the
end-of-recovery checkpoint cannot run concurrently.

--
Regards,
Dilip Kumar
Google



pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: OAuth client code doesn't work with Google OAuth
Next
From: Ashutosh Sharma
Date:
Subject: Re: Clear logical slot's 'synced' flag on promotion of standby