Beginner's guide to PostgreSQL Hacking
summary
Shows how to get and build PostgreSQL from source: use git and git worktree to manage versions, configure with debugging flags (enable-debug, enable-depend, --enable-cassert, and -O2 per the slides), then make, make install and run regression/isolation/pg T tests. Recommends starting in SRC and contrib (extensions) to prototype changes, use pg_ctl and attaching gdb to the backend PID to trace execution, and demonstrates where planner, buffer manager, WAL, locking and IPC code actually live.
AI-written summary · about
chapters (19)
- 0:00Introduction to PostgreSQL hacking
- 1:12Why hack PostgreSQL
- 8:38Getting PostgreSQL source code
- 13:16Source code layout overview
- 18:00Building PostgreSQL from source
- 22:16Starting PostgreSQL server
- 23:40Postmaster lifecycle
- 24:21Backend process lifecycle
- 25:27Query execution flow
- 26:52Data access and storage
- 27:58Transaction management
- 29:01Buffer and memory management
- 31:34Memory context system
- 35:03Locking mechanisms in PostgreSQL
- 37:29System caches and IPC
- 39:15Error handling and debugging
- 40:18Tools for PostgreSQL development
- 43:31Exploring PostgreSQL source code
- 45:00Q&A
related talks
50mHacking on Postgres: An Overview
50mPostgreSQL hacker tips
24mThe Hitchhiker’s Guide to PostgreSQL Hacking: Don’t Panic, Just Start Small
47mMy Journey in PostgreSQL bug fixing
42mMy Journey in PostgreSQL bug fixing
21mA Walking Tour of PostgreSQL
21mA Guided Tour Through Postgres Internals with Elizabeth Garrett Christensen
50mAn ultimate guide to upgrading your PostgreSQL installation
