0PricingLogin
SQL Academy · Lesson

MVCC and Bloat Causes

Understand multi-version concurrency control, why dead tuples accumulate, and how long transactions cause bloat.

What Is MVCC?

Multi-Version Concurrency Control. Instead of locking, PostgreSQL keeps multiple versions of a row. Readers see a consistent snapshot; writers create new versions without blocking readers.

How an UPDATE Works

An UPDATE doesn't change the row in place:

  1. Mark the old row version as "dead" at transaction T
  2. Write a new version
  3. Other transactions see whichever version their snapshot allows

All lessons in this course

  1. MVCC and Bloat Causes
  2. VACUUM, autovacuum, vacuum_cost_delay
  3. ANALYZE and pg_statistic
  4. Index-Only Scans and Visibility Map
← Back to SQL Academy