On this page
  1. MVCC, VACUUM & WAL
  2. Contents
  3. Tuple Versioning (xmin / xmax) & MVCC
  4. Dead Tuples, Autovacuum & ANALYZE
  5. WAL, Checkpoints & Replication

MVCC, VACUUM & WAL

Prev: postgresql | Up: postgresql | Next: JSONB, Arrays & Advanced Types
Rel: Transactions, ACID & Isolation Levels, Schema Migrations & Reliability
Ref: PostgreSQL โ€” Routine Vacuuming
Tags: #public #databases #postgresql #mvcc #internals


Contents


Tuple Versioning (xmin / xmax) & MVCC

In PostgreSQL, UPDATE does not overwrite a row in place โ€” it marks the old tuple with deleting transaction ID xmax and inserts a brand-new tuple version with creating transaction ID xmin. Each transaction sees a consistent snapshot without blocking readers.


Dead Tuples, Autovacuum & ANALYZE


WAL, Checkpoints & Replication

Every change is appended sequentially to the Write-Ahead Log (WAL) before dirty shared-buffer pages are flushed to disk during checkpoints. WAL powers crash recovery, streaming read replicas, logical replication, and Point-in-Time Recovery (PITR).

Linked from

Related notes