From: Tom Lane <tgl@sss.pgh.pa.us>
To: 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: Tue, 17 Apr 2018 14:57:03 -0400
Message-ID: <2384.1523991423@sss.pgh.pa.us> (raw)
In-Reply-To: <20180417182013.zi3wghrvyspiatkh@alvherre.pgsql>
References: <20180417182013.zi3wghrvyspiatkh@alvherre.pgsql>
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> David Pacheco wrote:
>> tl;dr: We've found that under many conditions, PostgreSQL's re-use of old
>> WAL
>> files appears to significantly degrade query latency on ZFS. The reason is
>> complicated and I have details below. Has it been considered to make this
>> behavior tunable, to cause PostgreSQL to always create new WAL files
>> instead of re-using old ones?
> I don't think this has ever been proposed, because there was no use case
> for it. Maybe you want to work on a patch for it?
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 :-(
regards, tom lane
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: 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: <2384.1523991423@sss.pgh.pa.us>
References: <20180417182013.zi3wghrvyspiatkh@alvherre.pgsql> <2384.1523991423@sss.pgh.pa.us>
* 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