Re: Purpose of wal_init_zero

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Ritu Bhandari <mailritubhandari(at)gmail(dot)com>, Andy Fan <zhihuifan1213(at)163(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Purpose of wal_init_zero
Date: 2025-01-20 17:02:56
Message-ID: Z46BwCNAEjLyW85Z@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 17, 2025 at 04:29:14PM -0500, Andres Freund wrote:
> I think what we instead ought to do is to more aggressively initialize WAL
> files ahead of time, so it doesn't happen while holding crucial locks. We
> know the recent rate of WAL generation, and we could easily track up to which
> LSN we have recycled WAL segments. Armed with that information walwriter (or
> something else) should try to ensure that there's always a fair amount of
> pre-allocated WAL.

I put some patches together for this a few years ago [0], but ended up
abandoning them due to lack of interest. I'm happy to revisit that effort
if folks do become interested.

[0] https://postgr.es/m/20220408203003.GA1630183%40nathanxps13

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-01-20 17:04:40 Re: POC: track vacuum/analyze cumulative time per relation
Previous Message Amul Sul 2025-01-20 16:53:14 Re: NOT ENFORCED constraint feature