All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Understanding PostgreSQL VACUUM at the Page Level: Dead Tuple Lifecycle and Space Reclamation

By

Radim Marek

1d ago· 24 min readenInsight

Summary

This article provides an in-depth technical exploration of VACUUM operations at the page level in PostgreSQL databases. It explains how VACUUM handles dead tuple cleanup beyond what HOT (Heap-Only Tuple) pruning can achieve, covering cold updates, DELETEs, index entry cleanup, free space map registration, and visibility map maintenance. The article uses tools like pageinspect, pg_freespace, and pg_visibility to demonstrate the lifecycle of a dead tuple — from losing its storage, to index entry removal, to slot reclamation, and eventual space reuse.

Source

Hacker NewsUnderstanding PostgreSQL VACUUM at the Page Level: Dead Tuple Lifecycle and Space Reclamationboringsql.com

Key quotes

· 3 pulled
For everything else (cold updates that touch indexed columns, plain DELETEs, index entry cleanup, free space map registration, visibility map maintenance) we need VACUUM.
Pruning is exactly that: a shortcut. It only works within a single page, and only for HOT-updated tuples.
Watch a VACUUM cycle with pageinspect, pg_freespace, and pg_visibility: how a dead tuple loses its storage, then its index entry, then its slot, and how the freed space gets reused.
Snippet from the RSS feed
Watch a VACUUM cycle with pageinspect, pg_freespace, and pg_visibility: how a dead tuple loses its storage, then its index entry, then its slot, and how the freed space gets reused.

You might also wanna read

How PostgreSQL survived near-death to become a cornerstone of modern cloud infrastructure

This feature article chronicles the unlikely survival and rise of PostgreSQL, tracing its origins from Michael Stonebraker's Postgres projec

theregister.com·13d ago

PostgreSQL positioned as a solution to AI-driven datacenter energy demands

This article discusses how AI workloads and datacenter expansion are driving an energy crisis, and positions Postgres (PostgreSQL) as a solu

theregister.com·1mo ago

PostgreSQL Connection Pooling Explained: How It Works and Why It Matters

sharafath.hashnode.dev·1mo ago

PostgreSQL Connection Pooling Explained: How It Works and Why It Matters

sharafath.hashnode.dev·1mo ago

Postgres evolves from storage system to data movement hub as AI and interoperability reshape its future

Postgres, traditionally viewed as a transactional database for operational workloads like customer records and financial transactions, is un

thenewstack.io·11d ago

Microsoft's Extended RUM Index in DocumentDB for PostgreSQL Improves ESR Query Performance

Microsoft has fixed a limitation in the DocumentDB extension for PostgreSQL by introducing an Extended RUM index that preserves key ordering

dev.to·29d ago

Rethinking database architecture: From monolithic storage to Lakebase and LTAP

The article discusses the evolution of database architecture, starting from the author's PhD experience at UC Berkeley where OLTP databases

databricks.com·6d ago

Rethinking database architecture: From monolithic storage to Lakebase and LTAP

The article discusses the evolution of database architecture, starting from the author's PhD experience at UC Berkeley where OLTP databases

databricks.com·6d ago

Comments

Sign in to join the conversation.

No comments yet. Be the first.