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

Nathan Bossart <bossartn@amazon.com>

From: Nathan Bossart <bossartn@amazon.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Michael Paquier <michael@paquier.xyz>
Date: 2018-11-02T14:47:08Z
Lists: pgsql-hackers
One argument for instead checking WAL file existence before calling
archive_command might be to avoid the increased startup time.
Granted, any added delay from this patch is unlikely to be noticeable
unless your archiver is way behind and archive_status has a huge
number of files.  However, I have seen cases where startup is stuck on
other tasks like SyncDataDirectory() and RemovePgTempFiles() for a
very long time, so perhaps it is worth considering.

Nathan

Commits

  1. Ensure cleanup of orphan archive status files