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

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: "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-12-06 23:18:12
Message-ID: 397BDCF8-F428-4616-95C3-24251AE32857@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/6/18, 4:54 PM, "Michael Paquier" <michael(at)paquier(dot)xyz> wrote:
> On Thu, Dec 06, 2018 at 02:43:35PM +0900, Michael Paquier wrote:
>> Why? A WARNING would be logged if the first unlink() fails, and
>> another, different WARNING would be logged if the subsequent fsync
>> fails. It looks enough to me to make a distinction between both. Now,
>> you may have a point in the fact that we could also live with only using
>> unlink() for this code path, as even on repetitive crashes this would
>> take care of removing orphan archive status files consistently.
>
> After sleeping on that, using plain unlink() makes indeed the most
> sense. Any objections if I move on with that, adding a proper comment
> explaining the choice? I don't plan to finish wrapping this patch today
> but Monday my time anyway.

That seems reasonable to me.

Nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-12-07 00:06:17 Re: don't create storage when unnecessary
Previous Message Peter Geoghegan 2018-12-06 22:59:28 Re: amcheck verification for GiST