Urgent.News

What's breaking now, across thousands of outlets.

More in Tech

MVCC Explained: Build Postgres-Style Snapshots in 100 Lines of TypeScript

Open two psql sessions. Session A: BEGIN ; DELETE FROM users ; -- deletes all 1 million rows -- don't commit yet Session B: SELECT count ( * ) FROM users ; -- count: 1000000 Session A deleted every…

  • MVCC enables readers and writers to coexist without interference in databases.
  • Updates and deletes are implemented by appending new versions while preserving old versions.
  • DELETE is marked as dead, allowing old versions to persist in the database.

More from Thursday 27 August →