Skip to content
RED SAGSkills
hard20 pts · first answer countstransactionsrow-lockspostgresql

Locked rows come back out of order

In PostgreSQL Read Committed, a worker runs the query below. Another session had locked one of the rows, raised its priority value, and then committed. What can the worker see?

SELECT * FROM jobs WHERE status = 'pending'
ORDER BY priority DESC LIMIT 5 FOR UPDATE;
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions