Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Nitin Motiani <nitinmotiani(at)google(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles
Date: 2025-09-09 08:37:18
Message-ID: CAFiTN-tyzLF5V8ksS1WCs1-ax3kbmXjtuoSa=8WqTe95aCwPhQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 9, 2025 at 1:23 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Mon, Sep 8, 2025 at 6:33 PM Nitin Motiani <nitinmotiani(at)google(dot)com> wrote:
> >
> > Hi Hackers,
> >
> > I'd like to propose a patch to allow accepting connections post recovery without waiting for the removal of old xlog files.
>
> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2025-09-09 08:48:55 Re: Clear logical slot's 'synced' flag on promotion of standby
Previous Message Zsolt Parragi 2025-09-09 08:16:10 Re: OAuth client code doesn't work with Google OAuth