Compiled Conversations

The Life of a PostgreSQL Table, Part 2 with Bruce Momjian

Oct 13, 2025
Bruce Momjian, a PostgreSQL expert, dives deep into the lifecycle of a PostgreSQL table. He explains Multi-Version Concurrency Control (MVCC) and how it handles concurrent updates. Learn about the differences between lightweight and heavyweight table alterations, and the impact of type changes. Bruce shares insights on the vacuuming process, the Write-Ahead Log's role in durability, and the necessity of indexing for performance. He also discusses how Postgres manages deletions and the intricacies of transaction isolation levels, promoting a robust understanding of PostgreSQL internals.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Updates Create New Row Versions

  • PostgreSQL implements updates by creating new row versions instead of overwriting old rows using MVCC transaction IDs.
  • This lets concurrent transactions see appropriate row versions without blocking each other.
INSIGHT

Heap-Only Tuples Reduce Overhead

  • PostgreSQL can place updated tuples on the same page as heap-only tuples to avoid index updates and speed cleanup.
  • If index columns change or space doesn't fit, a new pointer/page is created and cleanup becomes more expensive.
INSIGHT

Conflicting Updates Cause Waits

  • Update/delete conflicts cause a backend to wait on the transaction that holds the newer version until it finishes.
  • After the blocking transaction finishes (commit or abort), the waiting operation resumes and completes the delete/update.
Get the Snipd Podcast app to discover more snips from this episode
Get the app