Answer the question
In order to leave comments, you need to log in
How can you already implement skip locked in Postgres?
The new postgres will have a feature - skip locked, which skips locked rows in the table. A very useful feature for implementing queues. I wonder how you can already get a similar functionality. I myself am now implementing this at the language level. I store the state column and pull out one record at a time and try to lock them (by changing the state) through select for update. But this solution has downsides.
UPD: I need to make a persistent queue for executing pending tasks.
Answer the question
In order to leave comments, you need to log in
www.postgresql.org/docs/9.4/static/explicit-lockin...
www.postgresql.org/docs/9.4/static/functions-admin...
pg_try_advisory_xact_lock
indexcan (by order by ) and filter after where pg_try_advisory_xact_lock(myID )
dklab.ru/chicken/nablas/53.html here you have to look
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question