MVCC snapshots and version visibility

Trace which row version a snapshot can see, then separate PostgreSQL snapshot timing, write conflicts, and cleanup costs. Schedules and concurrency control · Databases.

A reader starts before a writer commits a new balance. Which version is visible, and what changes when the reader writes the same row?

What you will learn

  • Trace a snapshot boundary through committed versions and a transaction's own write
  • Separate MVCC visibility from locks, write conflicts, and serializability
  • Explain why obsolete versions and long-lived snapshots create cleanup cost

Lesson outline

  1. A snapshot chooses a row version
  2. PostgreSQL names its snapshot boundaries
  3. Cleanup trades retained history for storage and maintenance

22 minutes · 2 scenes · 0 predict checks · 10 quiz questions

The full lesson is available with Premium.