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

From Fujii Masao
Subject Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles
Date
Msg-id CAHGQGwExfU=EEsUhJ7_2CsU2-baT5xsJ5RK0+O5_6fE3BNOqZA@mail.gmail.com
Whole thread Raw
In response to [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles  (Nitin Motiani <nitinmotiani@google.com>)
Responses Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles
Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles
List pgsql-hackers
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 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?

One concern, though: in your case, the first checkpoint after crash recovery
could take a very long time, since it needs to remove a large number of
WAL files. This could delay subsequent checkpoints beyond checkpoint_timeout.
If so, perhaps we'd need to limit how many WAL files a single checkpoint
can remove.

Regards,

--
Fujii Masao



pgsql-hackers by date:

Previous
From: Ilia Evdokimov
Date:
Subject: Re: Use merge-based matching for MCVs in eqjoinsel
Next
From: Chao Li
Date:
Subject: Re: Fix missing EvalPlanQual recheck for TID scans