Re: Can PostgreSQL create new WAL files instead of reusing old ones?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Дата
Msg-id 2384.1523991423@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Can PostgreSQL create new WAL files instead of reusing old ones?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: Can PostgreSQL create new WAL files instead of reusing old ones?  (David Pacheco <dap@joyent.com>)
Re: Can PostgreSQL create new WAL files instead of reusing old ones?  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Следующее
От: David Pacheco
Дата:
Сообщение: Re: Can PostgreSQL create new WAL files instead of reusing old ones?