Can Lost Update happen in read committed isolation level in PostgreSQL?
问题 I have a query like below in PostgreSQL: UPDATE queue SET queue.status = 'PROCESSING' WHERE queue.status = 'WAITING' AND queue.id = (SELECT id FROM queue WHERE STATUS = 'WAITING' LIMIT 1 ) RETURNING queue.id and many workers try to process one work at a time (that's why I have sub-query with limit 1). After this update, each worker grabs information about the id and processes the work, but sometimes they grab the same work and process it twice or more. The isolation level is Read Committed.