4 ms·
Author here. Yeah, pretty much everything in the article is an anti-pattern. However, people are doing these things, and the implementations are correct, and pe
by renesd 10y ago
Author here. Yeah, pretty much everything in the article is an anti-pattern. However, people are doing these things, and the implementations are correct, and perform well enough for us. There are downsides, and dragons... beware!
- gbrits 10y agoWhat wasn't clear to me from the article is if Postgres can guarantee at-least-once semantics? I.e.: can it be guaranteed that messages are delivered to the consumer at least once given all kinds of failure situations?
- renesd 10y agoI think these slides describe it best. https://www.pgcon.org/2016/schedule/attachments/414_queues-pgcon-2016.pdf https://www.pgcon.org/2016/schedule/attachments/414_queues-p... Page 34. The key is SKIP LOCKED, so you do not try and grab an item off the queue which is already locked.
- gbrits 10y agoThanks. Reading the 'problems' section: a simple solution for "Resilience against crashing or hanging workers" would be having a TTL on the lock. If only...