Setup: Alice and Bob are both on call. At least one doctor must stay on call. T1 Alice asks to go off call; T2 Bob asks to go off call.
SELECT count(*) WHERE on_callSELECT count(*) WHERE on_callUPDATE alice SET on_call = falseUPDATE bob SET on_call = falseCOMMITCOMMIT| Read uncommitted | Read committed | Snapshot isolation | Serializable | |
|---|---|---|---|---|
| Dirty read | · | · | · | · |
| Lost update | · | · | · | · |
| Read skew | · | · | · | · |
| Write skew | · | · | · | · |