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-11-27T12:34:40Z
Lists: pgsql-hackers
Attachments
- archive-missing-v2.patch (text/x-diff) patch v2
On Thu, Nov 22, 2018 at 01:16:09PM +0900, Michael Paquier wrote: > No, pgarch_readyXLog() should still look after .ready files as those are > here for this purpose, but we could have an additional check to see if > the segment linked with it actually exists and can be archived. This > check could happen in pgarch.c code before calling the archive command > gets called (just before pgarch_ArchiverCopyLoop and after > XLogArchiveCommandSet feels rather right, and that it should be cheap > enough to call stat()). s/pgarch_ArchiverCopyLoop/pgarch_archiveXlog/. Attached is a patch showing shaped based on the idea of upthread. Thoughts? -- Michael
Commits
-
Ensure cleanup of orphan archive status files
- 6d8727f95e70 12.0 landed