Chapter 6. Durability: fsync, Group Commit, Checkpoint

The second line of the WAL rule in Chapter 5 was "a commit is recognized at the moment the commit record is safely stored on disk." The trickiest part of this rule is what exactly "safely stored on disk" means.

A program that writes data to a file and receives a "success" response has not necessarily put that data on the disk's persistent medium. This chapter examines the storage layers a write request passes through before reaching the persistent medium, why fsync, which confirms a write through all of those layers, is expensive, and how the database reduces and manages that cost with group commit and checkpoints. It covers durability, the last letter of ACID.