zlacker

[parent] [thread] 3 comments
1. LunaSe+(OP)[view] [source] 2019-05-27 11:18:53
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-craw...

- 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?

replies(3): >>soroko+M >>andrew+Rn >>floatb+s71
2. soroko+M[view] [source] 2019-05-27 11:28:30
>>LunaSe+(OP)
Here https://www.2ndquadrant.com/en/blog/what-is-select-skip-lock... is a good discussion.
3. andrew+Rn[view] [source] 2019-05-27 15:07:23
>>LunaSe+(OP)
Refer example code above. I don't think Postgres included SKIP LOCKED 4 years ago.
4. floatb+s71[view] [source] 2019-05-27 21:50:03
>>LunaSe+(OP)
There's a few libraries implementing this:

https://github.com/mbuhot/ecto_job for Elixir

https://github.com/timgit/pg-boss for Node.js

[go to top]