SQLHard
Explain the difference between READ COMMITTED and REPEATABLE READ.
READ COMMITTED takes a fresh snapshot per statement — non-repeatable reads are possible. REPEATABLE READ takes one snapshot at the start of the transaction; subsequent reads see the same data. Postgres REPEATABLE READ also prevents phantom rows.