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?
Discussion 0
Join free to post in the discussion.
Related questions
- Atomicity in a money transferBackend Developer
- Duplicate emails despite a checkBackend Developer
- What atomicity guaranteesBackend Developer
- Updating a counter in MongoDBBackend Developer
- Counting API calls in RedisBackend Developer
- Isolation levels and dirty readsBackend Developer
- Optimistic lock update hits 0 rowsBackend Developer
- Benefit of INCLUDE in an indexBackend Developer