The Core Idea
Multiversion concurrency control, or MVCC, stores several versions of a row over time instead of overwriting it in place. A write creates a new version tagged with the writing transaction. Old versions linger until no one can still need them.
Readers See a Snapshot
Each transaction reads as of a consistent point in time. When it reads a row, MVCC returns the version that was committed and visible at that point, ignoring newer uncommitted or later versions. So a reader never waits for a writer and a writer never waits for a reader.
Visibility Rules
The database decides which version a transaction sees using transaction ids or timestamps. A version is visible if the transaction that created it committed before the reader's snapshot, and was not later superseded within that snapshot.
Cleaning Up
Obsolete versions accumulate and must be removed. This garbage collection, called vacuuming in some systems, reclaims versions no active transaction can still see. Neglecting it causes bloat and slow scans.
Key idea
MVCC keeps multiple row versions so each transaction reads a consistent snapshot, letting readers and writers proceed without blocking, at the cost of cleaning up old versions.