1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Check for missing files in queueNeed().

Missing files would indicate that another process is running on the same spool path, which would be a very bad thing.

This check doesn't cost any additional I/O so it seems like a good idea.
This commit is contained in:
David Steele
2021-01-12 18:47:19 -05:00
parent aae6f06bcf
commit b21ed97982

View File

@@ -82,7 +82,7 @@ queueNeed(const String *walSegment, bool found, uint64_t queueSize, size_t walSe
// Else delete it
else
storageRemoveP(storageSpoolWrite(), strNewFmt(STORAGE_SPOOL_ARCHIVE_IN "/%s", strZ(file)));
storageRemoveP(storageSpoolWrite(), strNewFmt(STORAGE_SPOOL_ARCHIVE_IN "/%s", strZ(file)), .errorOnMissing = true);
}
// Generate a list of the WAL that are needed by removing kept WAL from the ideal queue