`bonzai` Part I: How Postgres stores pages on disk
I have started bonzai: a small B-tree engine that mimics Postgres’s on-disk format. My goal with this project is to understand the internals of some of Postgres’s features (MVCC, crash recovery, etc.) by implementing them myself. As I progress, I want to write posts about the concepts that I will learn along the way, and show how they translate into code. In this article, we look at where Postgres stores a table on disk and how its pages are laid out, and we implement utilities to read and parse Postgres pages from the file system. The rows stored inside these pages will be the subject of a later post. ...