Re: Use durable_unlink for .ready and .done files for WAL segment removal

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use durable_unlink for .ready and .done files for WAL segment removal
Date: 2018-11-27 20:50:05
Message-ID: 231D39B9-A06A-46E2-84A5-369EF7F70293@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/27/18, 2:46 PM, "Andres Freund" <andres(at)anarazel(dot)de> wrote:
> On 2018-11-27 20:43:06 +0000, Bossart, Nathan wrote:
>> I don't have exact figures to share, but yes, a huge number of calls
>> to sync_file_range() and fsync() can use up a lot of time. Presumably
>> Postgres processes files individually instead of using sync() because
>> sync() may return before writing is done. Also, sync() would affect
>> non-Postgres files. However, it looks like Linux actually does wait
>> for writing to complete before returning from sync() [0].
>
> sync() has absolutely no way to report errors. So, we're never going to
> be able to use it. Besides, even postgres' temp files would be a good
> reason to not use it.

Ah, I see. Thanks for clarifying.

Nathan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-11-27 20:54:55 Re: tab-completion debug print
Previous Message David Fetter 2018-11-27 20:47:47 Re: tab-completion debug print