Two transactions, many truths
Drive T1 and T2 below, or run a scenario. Then change the
isolation level and the recorded interleaving is re-evaluated from scratch —
watch dirty reads, non-repeatable reads, phantoms and lost updates appear or get blocked. This
models MVCC snapshot isolation (as in PostgreSQL), so Repeatable Read
here also prevents phantoms.
Scenarios:
T1 idle
T2 idle
No operations yet. Click an op on T1 or T2, or run a scenario.
MVCC version chain — row
x xmin = created by · xmax = superseded by
Each WRITE appends a new version instead of overwriting. A transaction sees the newest version its
snapshot is allowed to see. Old versions linger as dead tuples until vacuum reclaims
them. (INSERTs for COUNT(*) are tracked separately and not drawn here.)
Step log interleaved, oldest first