Hacker News new | ask | show | jobs
by compressedgas 189 days ago
I thought an fsync on the containing directories of each of the logs was needed to ensure the that newly created files were durably present in the directories.
1 comments

Right, you do need to fsync when creating new files to ensure the directory entry is durable. However, WAL files are typically created once and then appended to for their lifetime, so the directory fsync is only needed at file creation time, not during normal operations.