Spokes.wiki Search About
Defined Term updated Sun Aug 09 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

Multiversion concurrency control (MVCC)

Keep more than one version of a row, and a reader can be given the version that was current when its statement started instead of waiting for a writer to finish. PostgreSQL’s docs state the rule: “Each SQL statement sees a snapshot of data (a database version) as it was some time ago, regardless of the current state of the underlying data.” The property that follows is the one the technique exists for — reading never blocks writing and writing never blocks reading.

Both engines this spoke now holds run on it, from different implementations. Postgres writes a new row version in the heap and leaves the old one for vacuum to reclaim. InnoDB keeps the current row in place and older versions in an undo log, reconstructing what a transaction should see (“Oracle-style consistent reads”). Same guarantee to the application, different costs: Postgres pays in table bloat and vacuum, InnoDB pays in undo-log growth and long-transaction pressure.

Isolation. Postgres reaches serializability through Serializable Snapshot Isolation, which detects the dangerous read/write patterns rather than preventing them with locks; the docs frame the whole approach as minimizing “lock contention in order to allow for reasonable performance in multiuser environments.”

Where it sits against the rest of the spoke

MVCC is the single-node answer to the question consistency-models asks of distributed systems: when does a write become visible, and in what order. On one node with snapshots the answer is exact and cheap. Across nodes it becomes the CAP argument, and a snapshot needs a global notion of “some time ago” that no one gets for free. turso carries MVCC into the embedded case explicitly (concurrent writes in a SQLite-compatible engine), and event-sourcing is the local-first alternative — never overwrite anything, so versions are the storage model rather than a concurrency mechanism laid over it.

Growth edge 6 asked for the storage-engine vocabulary — B-trees, LSM trees, the WAL, MVCC. This is the MVCC quarter of it, from two engines’ own documentation. The other three are still undefined here.