Skip to content
uencoder

Multi-Version Concurrency Control

MVCC maintains multiple versions per row; reads use a consistent snapshot without locking, achieving high concurrency where reads do not block writes.

Purpose

To understand the core mechanism for highly concurrent reads in modern databases (PostgreSQL/Oracle/InnoDB).

Mechanism

Each row carries version stamps (xmin/xmax or transaction IDs). Reads pick the visible version per the transaction snapshot, lock-free. Writes create a new version and mark the old one expired. Deadlocks and write skew need extra detection.

Use cases

  • High-concurrency read optimization
  • Snapshot isolation implementation
  • Database internals

Related tools

References