← Back to context

Comment by compressedgas

4 months 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.

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.