Caffeinated Coder
Book an appointment
Lesson 15 · Inside a database

Isolation levels

When two transactions run at the same time, the isolation level decides how much each one sees of the other's work. Follow one worked example in PostgreSQL: a report (T1) and a transfer (T2) share the acct table. PostgreSQL keeps several versions of every row (MVCC) and gives each transaction a snapshot. Watch Read Committed allow a nonrepeatable read, Repeatable Read freeze one snapshot and refuse a stale write, and Serializable stop a write skew with error 40001.

14 min11 steps5 questionsAdvanced
Fig 15 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.