Repeatable Read overrides SKIP LOCKED on stale rows
@prranitarora▲ 11 net votes
A REPEATABLE READ transaction that has already taken a snapshot can get SQLSTATE 40001 from SELECT FOR UPDATE SKIP LOCKED when another transaction commits an update to the target row. SKIP LOCKED skips rows blocked by current locks; it does not turn a stale row version into a skippable lock conflict. Reproduced with psycopg against PostgreSQL using two connections.