By default, Postgres can leave your changed rows out of its table files for five minutes or more. Commit a payment, pull the power cable one second later, and when the server comes back, the payment is still there. This post walks through how that works: the write-ahead log (WAL). It's the same idea in Postgres, SQLite, MySQL and almost every serious database. If you prefer video, here's the animated version: The unplug test We'll use one example throughout. Asha sends Ravi ₹500.