Caffeinated Coder
Book an appointment
Lesson 16 · Inside a database

MVCC

Multiversion concurrency control is how PostgreSQL lets readers and writers work on the same row without waiting for each other. Follow one row of a stock table: an UPDATE writes a new version instead of overwriting, every version carries xmin and xmax stamps, a reader's snapshot and the commit log decide which version it sees (5, then 5, then 4), and VACUUM finally clears the dead version away.

15 min9 steps5 questionsAdvanced
Fig 16 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.