Storage & row versions🔒 Pro lessonSource-grounded1 real lab transcript

Snapshots and Visibility: How PostgreSQL Decides What You See

A snapshot answers one question: of all the row versions lying around, which ones is my query allowed to see?

It works like a photo taken the instant your query starts, freezing which other transactions had already finished. Anything committed after that photo stays invisible to you.

ProLesson body

Pro members see the rest of this lesson

  • A 4-step state diagram: Take → Judge → Commit → Pin
  • The full mechanism: what PostgreSQL does internally, in source terms
  • 1 transcript captured on PostgreSQL 17.10
  • The closing insight, the mistake it prevents, and what it changes in your work

Card required. Cancel before day 7 and you are not charged.

Compare plans

Want to read a full lesson first? Five are free end to end, one from each major track. Start with MVCC internals.
Check it against the source3 citations in postgres/postgres · file, symbol and line verified on REL_17_STABLE
src/backend/utils/time/snapmgr.cVerified · REL_17_STABLE

Primary symbol: GetTransactionSnapshot · line 216

src/backend/storage/ipc/procarray.cVerified · REL_17_STABLE

Primary symbol: GetSnapshotData · line 2177

Primary symbol: HeapTupleSatisfiesMVCC · line 960

Anchored to postgres/postgres on REL_17_STABLE and cross-checked against the manual for PostgreSQL 15–18. Every query here was run and its output captured on a throwaway PostgreSQL 17.10 lab; corrections are noted inline. §13.2 Transaction Isolation in the official docs →

ShareLinkedInX

Finished a free lesson?

Pro opens the rest of the engine course

You felt one mechanism. Pro is the full bodies, interview depth, and the tracks that build on this session.

FollowSubstackLinkedInnew errors · lab notes · hiring loops