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

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Nitin Motiani <nitinmotiani(at)google(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Accept connections post recovery without waiting for RemoveOldXlogFiles
Date: 2025-09-09 07:52:52
Message-ID: CAHGQGwExfU=EEsUhJ7_2CsU2-baT5xsJ5RK0+O5_6fE3BNOqZA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-09-09 07:52:54 Re: Fix missing EvalPlanQual recheck for TID scans
Previous Message Ilia Evdokimov 2025-09-09 07:29:36 Re: Use merge-based matching for MCVs in eqjoinsel