I wonder why pg_wal directory needs to be fsync'd when deleting WAL files from it. Even if those WAL files come back unexpectedly after crash, they will be deleted again by subsequent checkpoint or recovery. So it seems safe not to fsync pg_wal in that case.
At the very least we'd end up re-archiving files, which has quite the potential for being disastrous. Also, there's a bunch of codepaths iterating from oldest known existing WAL onwards, that'd be broken by reappearing files.
-
-
ok, re-archiving occurs if old WAL file revives while unfortunately its .done status file is really gone. It seems less likely to happen, but it *can* happen.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.