Re: Purpose of wal_init_zero - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Purpose of wal_init_zero
Date
Msg-id Z46BwCNAEjLyW85Z@nathan
Whole thread Raw
In response to Re: Purpose of wal_init_zero  (Andres Freund <andres@anarazel.de>)
Responses Re: Purpose of wal_init_zero
List 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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Eager aggregation, take 3
Next
From: Tom Lane
Date:
Subject: Re: Proper way to clean-up connection for reuse (`DISCARD ALL` and default role)