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:
- Mark the old row version as "dead" at transaction T
- Write a new version
- Other transactions see whichever version their snapshot allows