Write skew
Definition
Write skew happens when concurrent transactions each check a condition on shared data, then write to different rows, so neither sees the other's write and the combined result violates the invariant.
In practice
Because the transactions touch different rows, row locks and snapshot isolation do not detect a conflict. Typical cases are on-call rotas, double booking of a room checked by a query over existing bookings, and usernames checked for uniqueness before insert. Only SERIALIZABLE isolation prevents it in general.
Alternatives at lower levels are to materialise the conflict: lock a shared row with SELECT ... FOR UPDATE, or turn the rule into a constraint such as a unique index or an exclusion constraint. Any approach based on SERIALIZABLE needs retries, because the database prevents write skew by aborting one of the transactions.
Example
Two doctors are on call; each runs SELECT count(*) FROM on_call, sees 2, and removes themselves in the same second, leaving 0 doctors on call.