What Actually Happens When You UPDATE a Row in PostgreSQL?
Most developers think of a PostgreSQL table like this: 1 | 25 Then we run: UPDATE users The obvious mental model is: 25 → 30 But PostgreSQL doesn't simply overwrite the old value. To understand what actually happens, we need to look at how PostgreSQL stores rows and how MVCC (Multi-Version Concurrency Control) works. Tables are stored as pages PostgreSQL stores table data in fixed-size pages. The usual page size is 8 KB. You can roughly imagine a table as: users ┌─────────────────┐ Each page ca
