Re: Purpose of wal_init_zero

From: Michael Banck <mbanck(at)gmx(dot)net>
To: Andy Fan <zhihuifan1213(at)163(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Purpose of wal_init_zero
Date: 2025-01-15 14:59:04
Message-ID: 6787cd38.050a0220.2855f9.97cc@mx.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Jan 15, 2025 at 09:12:17AM +0000, Andy Fan wrote:
> I can understand that "the file space has really been allocated", but
> why do we care about this?
>
> One reason I can think of is it has something with "out-of-disk-space"
> sistuation, even though what's the benefit of it since we can't do
> anything in such case anyway no matter the wal space is pre-alocated or
> not?

My understanding was that if we have pre-allocated wal space (and
re-cycle already used wal files), we can still write wal records into
that pre-allocated space and still issue changes to data files as long
as we don't need to enlarge any. So an out-of-space situation is less
bad in that case than if we fail to write WAL with ENOSPC.

Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2025-01-15 15:51:54 Re: Purpose of wal_init_zero
Previous Message Yura Sokolov 2025-01-15 14:43:46 Re: [WIP]Vertical Clustered Index (columnar store extension) - take2