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