How PostgreSQL Uses B-Tree Indexes to Retrieve Data from Disk

Tracing how PostgreSQL traverses B-Tree indexes, resolves Tuple Identifiers (TIDs), fetches heap pages, and eventually turns a SQL query into disk reads.

May 30, 2026 · Ajinkya D

From SQL to disk in Postgres

A practical, surface-level tour of what PostgreSQL writes to disk when you run SQL—OIDs, relfilenodes, heap segments, and 8KB pages—plus how to peek at the raw files.

April 27, 2026 · Ajinkya D