Series · 6 parts
PostgreSQL Internals
How PostgreSQL executes a query, finds your data, and why its B-tree indexes behave the way they do.
What happens between hitting enter on a SELECT and the rows coming back: parser, planner, executor, the buffer manager, and when it finally touches disk.
· 11 min read
A closer look at the part I glossed over last time: what a B-tree index actually looks like on disk, when Postgres reaches for a bitmap scan instead, and how an index-only scan skips the table entirely.
· 9 min read
Why an index lookup touches only a handful of pages, what every extra index quietly costs on writes, and how to think about composite indexes as one sorted list instead of a bag of columns.
· 11 min read
Follow one query from your keyboard to the disk and back, with an animation you can click through, and the one command that shows you every stage.
· 7 min read
When PostgreSQL says COMMIT succeeded, your table pages may not be on disk yet. Here is how the write-ahead log, row versions and checkpoints make that safe.
· 9 min read
Both are 128-bit UUIDs, but one scatters inserts across your B-tree and the other keeps them on the right edge. What that changes, what it doesn't, and how to measure it.
· 7 min read