Skip WAL recycling and preallocation during archive recovery.
Noah Misch <noah@leadboat.com>
Skip WAL recycling and preallocation during archive recovery. The previous commit addressed the chief consequences of a race condition between InstallXLogFileSegment() and KeepFileRestoredFromArchive(). Fix three lesser consequences. A spurious durable_rename_excl() LOG message remained possible. KeepFileRestoredFromArchive() wasted the proceeds of WAL recycling and preallocation. Finally, XLogFileInitInternal() could return a descriptor for a file that KeepFileRestoredFromArchive() had already unlinked. That felt like a recipe for future bugs. Discussion: https://postgr.es/m/20210202151416.GB3304930@rfd.leadboat.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlog.c | modified | +57 −8 |
Discussion
- Race between KeepFileRestoredFromArchive() and restartpoint 15 messages · 2021-02-02 → 2022-08-04