Two PostgreSQL transactions run concurrently at READ COMMITTED. T2's UPDATE is blocked by T1's lock on the same row. After T1 commits its change, what does T2 do with its WHERE predicate, and why can this surprise people?
-- T1
BEGIN;
UPDATE accounts SET status='frozen' WHERE id=5;
COMMIT;
-- T2 (started concurrently, blocked on id=5)
BEGIN;
UPDATE accounts SET balance=balance+100 WHERE id=5 AND status='active';
COMMIT;