3 ms·
Do you have an example of such a queue somewhere? I think I have a rough idea about how it works because I implemented something similar about four years ago i
by LunaSea 7y ago
Do you have an example of such a queue somewhere?
I think I have a rough idea about how it works because I implemented something similar about four years ago in PostgreSQL but kept getting locking issues I couldn't get out of:
- https://stackoverflow.com/questions/33467813/concurrent-crawler-postgresql-query-issues https://stackoverflow.com/questions/33467813/concurrent-craw...
- https://stackoverflow.com/questions/29807033/postgresql-concurrent-transaction-issues https://stackoverflow.com/questions/29807033/postgresql-conc...
Also, what kind of queue size / concurrency on the polling side are you able to sustain for your current hardware?
- sorokod 7y agoHere https://www.2ndquadrant.com/en/blog/what-is-select-skip-locked-for-in-postgresql-9-5/ https://www.2ndquadrant.com/en/blog/what-is-select-skip-lock... is a good discussion.
- andrewstuart 7y agoRefer example code above. I don't think Postgres included SKIP LOCKED 4 years ago.
- floatboth 7y agoThere's a few libraries implementing this: https://github.com/mbuhot/ecto_job https://github.com/mbuhot/ecto_job for Elixir https://github.com/timgit/pg-boss https://github.com/timgit/pg-boss for Node.js