archive-clean-durable.patch

text/x-diff

Filename: archive-clean-durable.patch
Type: text/x-diff
Part: 0
Message: Use durable_unlink for .ready and .done files for WAL segment removal

Patch

Format: unified
File+
src/backend/access/transam/xlogarchive.c 2 2
diff --git a/src/backend/access/transam/xlogarchive.c b/src/backend/access/transam/xlogarchive.c
index d40317168e..86c8383e11 100644
--- a/src/backend/access/transam/xlogarchive.c
+++ b/src/backend/access/transam/xlogarchive.c
@@ -762,11 +762,11 @@ XLogArchiveCleanup(const char *xlog)
 
 	/* Remove the .done file */
 	StatusFilePath(archiveStatusPath, xlog, ".done");
-	unlink(archiveStatusPath);
+	durable_unlink(archiveStatusPath, DEBUG1);
 	/* should we complain about failure? */
 
 	/* Remove the .ready file if present --- normally it shouldn't be */
 	StatusFilePath(archiveStatusPath, xlog, ".ready");
-	unlink(archiveStatusPath);
+	durable_unlink(archiveStatusPath, DEBUG1);
 	/* should we complain about failure? */
 }