MVCC(Multi-Version Concurrency Control,多版本并发控制)是 PostgreSQL 处理并发访问的方式——它不是通过锁定行来进行读取,而是保持多个版本的行,使得每个事务都能看到数据的一个一致的快照。关键优势:读取者不阻塞写入者,写入者也不阻塞读取者,从而实现高并发。
核心理念:多个行版本
When a row is UPDATED, Postgres doesn't overwrite it — it creates a NEW version and
marks the old one obsolete. Different transactions can see different versions.
→ Each transaction sees a consistent SNAPSHOT of the database as of its start
(depending on isolation level), unaffected by others' uncommitted changes.
