Databases
Bug Report
Postgres job queue processes the same job twice: fixing it with FOR UPDATE SKIP LOCKED
Customers got two copies of the same invoice email because two workers claimed one job row. The claim query looked atomic but was not under READ COMMITTED. One CTE with FOR UPDATE SKIP LOCKED, plus a lease, fixed it.