From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Do we need pre-allocate WAL files during end-of-recovery checkpoint? |
Date: | 2021-12-07 08:22:20 |
Message-ID: | CALj2ACX3Z7tXb2ZZjypo=pLWnZa8szsCXXwB7VjAwV9dy4rfCg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 7, 2021 at 12:09 PM Noah Misch <noah(at)leadboat(dot)com> wrote:
>
> On Mon, Dec 06, 2021 at 06:21:40PM +0530, Bharath Rupireddy wrote:
> > The function PreallocXlogFiles doesn't get called during
> > end-of-recovery checkpoint in CreateCheckPoint, see [1]. The server
> > becomes operational after the end-of-recovery checkpoint and may need
> > WAL files.
>
> PreallocXlogFiles() is never a necessity; it's just an attempted optimization.
> I expect preallocation at end-of-recovery would do more harm than good,
> because the system would accept no writes at all while waiting for it.
Yeah. At times, end-of-recovery checkpoint itself will take a good
amount of time and adding to it the pre-allocation of WAL time doesn't
make sense.
> > However, I'm not sure how beneficial it is going to be if
> > the WAL is pre-allocated (as PreallocXlogFiles just allocates only 1
> > extra WAL file).
>
> Yeah, PreallocXlogFiles() feels like a relict from the same era that gave us
> checkpoint_segments=3. It was more useful before commit 63653f7 (2002).
I see.
Regards,
Bharath Rupireddy.
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2021-12-07 08:23:42 | Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints |
Previous Message | Bharath Rupireddy | 2021-12-07 08:20:42 | Re: Do we need pre-allocate WAL files during end-of-recovery checkpoint? |