Skip to content
Computing Rich #mvcc#postgres#isolation

MVCC: Multi-Version Concurrency Control

Each row has multiple versions tagged by transaction ID. Readers never block writers.

A free, animated mvcc: multi-version concurrency control you can read here or embed on any website, from Scrollchart.

MVCC: Multi-Version Concurrency Control

MVCC: Multi-Version Concurrency ControlReaders see a frozen snapshot; writers append a new version. No read/write blocking.Row: products.price (version chain)Txn 420 (snap=420)sees price=69 (xmin=350, xmax=510)Txn 515 (snap=515)sees price=79 (xmin=510, xmax=∞)Txn 600 (writer)appends new version, no lockReaders never block writers. Writers never block readers.VACUUMScans the heap for tuples whose xmax is below the oldest active transaction (OldestXmin). Dead tuples (xmax< OldestXmin) are reclaimed. Postgres autovacuum triggers when dead-tuple ratio exceeds ~20%.reclaimable

A row with a chain of versions tagged xmin/xmax. Two transactions read consistent snapshots; a writer creates a new version without blocking readers. VACUUM cleans tuples no longer visible to any active transaction.

Good for

  • Postgres internals deep dives
  • Explaining why UPDATE is slower than INSERT in heap-based engines
  • Teaching isolation levels and snapshot semantics

Source & accuracy

This mvcc: multi-version concurrency control is an editorial illustration built to represent the concept accurately. Where it shows figures, they are typical or representative values chosen to make the relationship clear, not a single underlying dataset. The diagram and its explainer are reviewed and maintained centrally, and updated over time as understanding improves.

Multiple versions allow non-blocking concurrent access

Multi-Version Concurrency Control (MVCC) tags each row with a version number (transaction ID). When a transaction reads, it sees the version visible at its snapshot time. When writing, a new version is inserted instead of modifying in-place. Readers never block writers because they read old versions; writers never block readers because new writes are separate versions.

This solves the classic problem of blocking locks in transactional systems. Instead of lock contention, concurrent transactions read and write non-overlapping versions. Reads are fast; writes create versions that are visible to future transactions but not retroactively to past ones, providing snapshot isolation.

Garbage collection and phantom row cleanup

As transactions commit and become old, their versions become invisible to all new transactions. These old versions accumulate and must be garbage collected. Databases track the oldest active transaction; any version older than that can be deleted. Aggressive garbage collection keeps disk usage bounded.

A drawback: long-running transactions pin old versions in memory, preventing cleanup and causing bloat. PostgreSQL's autovacuum manages cleanup; if a transaction holds a snapshot for hours, autovacuum stalls and the database fills. In practice, MVCC is essential for OLTP (where short, concurrent transactions are normal) and problematic for OLAP (where long analytical queries block cleanup). Understanding transaction lifecycle is critical for database performance tuning.

Embed this diagram

Add this animated mvcc: multi-version concurrency control to your own site. Copy one line of HTML, or use the embed builder for theme and sizing options.

Reference

What this is
A free, embeddable, animated mvcc: multi-version concurrency control for any website.
Who uses it
Developer blogs, CS educators, DevOps / SRE sites.
How to embed
Copy one line of HTML. No signup. No watermark. Works in WordPress, Webflow, Ghost, Substack, plain HTML.
File size
iframe embed, ~80 KB gzipped (loads on demand, does not block your page paint).
License
Free forever. Editorial explainer text included; updated centrally over time.

Embed format options

Copy the universal HTML snippet, the WordPress shortcode, or an iframe fallback - see the WordPress plugin page for details. Any format keeps the same Core Web Vitals profile and the same explainer text.

Embed snippet
<div data-scrollchart="mvcc-versioning" data-scrollchart-v="1"></div>
<script src="https://scrollchart.com/embed.js" async></script>

Frequently asked questions

Where can I get a free animated "MVCC: Multi-Version Concurrency Control" for my website?
Scrollchart provides "MVCC: Multi-Version Concurrency Control" as a free, embeddable animated diagram you can add to any website with one line of HTML. No signup is required and there is no watermark. The diagram and its explainer text are served from scrollchart.com, so the embed stays current without any maintenance on your end.
How do I embed a mvcc: multi-version concurrency control in a developer or tech blog?
Copy the one-line snippet from the Scrollchart diagram page and paste it into your post HTML. It works in any static site generator, CMS, or hand-coded HTML page. The embed is a thin loader, not an iframe, so the content is fully in your DOM.