
Author
Chase Pierce
Founder of Flagon and author of Eight Kilobytes: PostgreSQL from the page up. The book starts at the 8 KB page on disk, and every example in it runs on PostgreSQL 18.
About the book
Almost everything about PostgreSQL performance comes down to one number: 8,192
That’s the size of a page, the unit Postgres reads, writes, and caches. A fast query touches few pages. A slow one touches many, or waits on someone else who is. Once you can see the pages, most of the mystery goes away.
You’ve probably met the symptoms already. The dashboard that was instant at launch and crawls now. The migration that “does nothing” and took the site down anyway. The table that keeps growing faster than the data in it. And the standing offer to fix all of it with a bigger instance. This book is the alternative to that offer.
From the book's introduction
- Two habits
- Before you add an index, raise a setting, or blame the ORM, ask how many pages the work touches. And before you buy a bigger database, or a second one, use up the cheap fixes and prove in numbers that you’ve outgrown them.
- A check for every claim
- Every query ran against PostgreSQL 18, on a sample schema you can load in a minute, and every claim that matters comes with a lab check you can rerun on your own machine.
- Who it's for
- Application developers who use Postgres every day, often through an ORM. You need basic SQL, not internals.
Contents
Eight parts, forty‑four chapters
Each chapter is a short essay you can read on its own; deep dives hold the machinery and the full measurements for when you want them.
Front matter
The machine
Designing for it
Finding rows fast
Running it
Scaling out
Back matter
Summary
A modern, evidence-driven guide to PostgreSQL from the 8 KB page up
All 44 English chapters and the Chinese edition are published side by side with SQL checks.
Eight Kilobytes: PostgreSQL from the page up teaches PostgreSQL from its fundamental storage unit—the 8 KB page—showing how tuple layout, buffer caching, MVCC visibility, HOT updates, WAL, and VACUUM directly govern schema design, indexing, query planning, online migrations, and production operations.
Edition and rights
Free to read online, with all rights reserved by Flagon
- The book
- Eight Kilobytes: PostgreSQL from the page up by Chase Pierce, published by Flagon. First edition, 2026-10-05; every example runs on PostgreSQL 18.
- License
- © 2026 Flagon, Inc. The text, figures, and cover are free to read online but may not be republished, redistributed, or sold, in whole or in part, without written permission from Flagon. Full license
- Lab kit
- Licensed separately under the MIT License and available from the original Eight Kilobytes lab.