The commit record is the transaction
A transaction is durable when its log record reaches stable storage, so the log, not the data pages, is the promise.
A commit is a promise about the log, not about pages. The database appends a record describing the change, forces it to stable storage with one fsync, and only then reports success. Pages can be rebuilt later from that record, so a crash costs replay time instead of data. The consequence: the latency floor of a commit is one fsync, and every later design either keeps that barrier cheap or moves it.
Take a transfer: debit one account, credit another. The engine appends a WAL record that names both changes and marks the transaction as committed. It writes that record to the log buffer and calls fsync. On NVMe that call takes 0.1 to 1 ms, and nothing on the commit path may report success before it returns. Only after the flush does the engine acknowledge the client. The dirty pages stay in memory and are written back later. If the machine dies before the write-back, recovery reads the log, finds the committed record, and reapplies the change to the page. Atomicity falls out of the same rule: a transaction with no commit record is ignored during replay.
The abstraction hides that durability is only as honest as the flush. A drive with a volatile write cache can acknowledge a flush before the bits reach stable media, when the cache is unprotected or the flush is ignored. Suppose the engine logs a transfer, the drive reports the flush complete, and the client receives OK. Power drops before the cache empties. On restart the commit record is missing, recovery discards the transfer as uncommitted, and the client holds a receipt for money that never moved. The engine did everything correctly from its own view; it trusted a system call that lied. Group commit makes this worse: one bad flush now acknowledges many transactions at once, so a single lie loses a batch rather than one record.
The decision rule: put the commit record, not the page, at the center of the design. Measure fsync on the target hardware before setting a latency budget, and check the number under load rather than trusting the spec sheet. Batch commits when throughput matters more than per-transaction latency, but accept that every transaction in a batch waits for the slowest flush. Never place a network hop between the engine and the flush unless you can name which bytes are durable at each acknowledgement. Verify durability by killing the process mid-write and pulling power on the real stack, not by reading the config. If you cannot name the record that proves a transaction committed, do not return success to the client.
- WAL record
- 50-200 bytes
- fsync on NVMe
- 0.1-1 ms
- Group commit
- one fsync per batch
- Commit latency floor
- one fsync
One log entry describing a change. Records are small, so the cost of logging is dominated by flushes, not bytes.
The wait for the drive to confirm log bytes are on stable media. Every commit pays this wait before it can succeed.
Many transactions share one flush, which raises throughput while each transaction waits for the batch.
No commit returns faster than the flush that makes it durable, however fast the CPU is.
The obvious split treats storage as a remote disk. The compute node ships its 8 KB pages to a shared volume, the way a local engine would write them to a local one. The design looks like a storage problem, so it invites a storage answer.
The wall arrives on the first commit. Pages are overwritten in place, so the storage layer cannot tell which version a crash left behind. Every fsync must now cross the network, which turns a fraction-of-a-millisecond barrier into a round trip, and the database cannot say which bytes are durable at any moment.
Neon changed the unit that crosses the network. Compute now generates WAL records and sends only those, and the storage layer materializes a page at a requested log sequence number, so pages are reconstructed rather than overwritten. Old versions stay addressable because nothing is updated in place. The log, not the page, became the artifact the whole system agrees on.
The lesson is that the transaction's real artifact is the log stream. Once it is shipped, durability, replication and point-in-time reads all come from one sequence instead of three separate mechanisms. Replicas apply the same records, and a read at an earlier LSN returns the state at that point. Anyone asking where durability lives should look at what crosses the wire.