TLDR Tech / Data
PostgreSQL MVCC, Byte by Byte
PostgreSQL's MVCC works by storing multiple versions of each row on disk. Every tuple contains xmin and xmax fields that determine its visibility to transactions. Readers never block writers, and writers never block readers. When a row is updated or deleted, a new version is created instead of overwriting the old one. Old versions are cleaned up later by the vacuum process.
Read the full story