hard20 pts · first answer countstransactionsconcurrencypostgresql
Two doctors go off call at once
Rule: at least one doctor must be on call. Two transactions run at the same time under PostgreSQL REPEATABLE READ. Each counts on-call doctors, sees 2, and sets a different doctor off call. Both commit and nobody is on call. What prevents this?