Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardSQLdirty / phantom / non-repeatable readsSingle-choice MCQ

Two concurrent transactions in PostgreSQL run this. T1 and T2 both start, then run their UPDATE, then both COMMIT. Both filter on the SAME rows but write disjoint columns. What is the outcome at READ COMMITTED?

-- T1 BEGIN; UPDATE account SET balance = balance - 100 WHERE id = 1; -- T2 (concurrent) BEGIN; UPDATE account SET name = 'x' WHERE id = 1;