From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: David Pacheco <dap@joyent.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Date: Wed, 18 Apr 2018 13:35:43 +0900
Message-ID: <20180418043543.GI18178@paquier.xyz> (raw)
In-Reply-To: <2384.1523991423@sss.pgh.pa.us>
References: <20180417182013.zi3wghrvyspiatkh@alvherre.pgsql>
<2384.1523991423@sss.pgh.pa.us>
On Tue, Apr 17, 2018 at 02:57:03PM -0400, Tom Lane wrote:
> I think possibly the OP doesn't understand why it's designed that way.
> The point is not really to "recycle old WAL files", it's to avoid having
> disk space allocation occur during the critical section where we must
> PANIC on failure. Now, of course, that doesn't really work if the
> filesystem is COW underneath, because it's allocating fresh disk space
> anyway even though semantically we're overwriting existing data.
> But what I'd like to see is a fix that deals with that somehow, rather
> than continue to accept the possibility of ENOSPC occurring inside WAL
> writes on these file systems. I have no idea what such a fix would
> look like :-(
That looks like a rather difficult problem to solve in PostgreSQL
itself, as the operator running the cluster is in charge of setting up
the FS options which would control the COW behavior, so it seems to me
that there is room as well for an in-core option to tell the
checkpointer to enforce the removal of past files instead of simple
recycling them, because this actually breaks max_wal_size.
max_wal_size is of course a soft limit, and it has been discussed a
couple of times that it would be nice to get that to a hard limit, but
it is really a hard problem to avoid the system to not slow down or even
stop its I/O if the hard is close by or reached..
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, dap@joyent.com
Subject: Re: Can PostgreSQL create new WAL files instead of reusing old ones?
In-Reply-To: <20180418043543.GI18178@paquier.xyz>
References: <20180417182013.zi3wghrvyspiatkh@alvherre.pgsql> <2384.1523991423@sss.pgh.pa.us> <20180418043543.GI18178@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox