PostgreSQL - Transactions and Concurrency
Why does this transaction fail under Serializable isolation?BEGIN;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
SELECT balance FROM accounts WHERE id = 1;
UPDATE accounts SET balance = balance + 50 WHERE id = 1;
COMMIT;
Meanwhile, another transaction updated the same row and committed.
