Skip to content
Theory · MVCC: Row Versions and VACUUM · lesson 3 of 11

Snapshots and visibility

Let's go back to the price ledger. Suppose everyone who sits down to read it gets a stamp at the door: "entries up to 105, except 103, which is still being written". From then on the reader looks at the page through this stamp. A line added by an entry the stamp covers is visible to them. A crossing-out made by an entry after the stamp does not count for them.

In this lesson

  • Snapshot
  • Visibility of a version
  • A rollback does not erase xmax
  • When the snapshot is taken
  • A read does not wait for a write
  • Common mistake
  • Key points