Re: Use durable_unlink for .ready and .done files for WAL segment removal
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: bossartn@amazon.com, pgsql-hackers@lists.postgresql.org
Date: 2018-12-06T22:53:20Z
Lists: pgsql-hackers
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. -- Michael
Commits
-
Ensure cleanup of orphan archive status files
- 6d8727f95e70 12.0 landed