Over 5 years ago my then-colleague wrote about problems with Postgres queues and the accumulation of garbage MVCC versions (see brandur.org/postgres-queues). Expect significant improvements in this area for Postgres 14:
Conversation
6
Hi Soren, while implementing Oban, were you aware of this?
1
Yes, very aware! Brandur’s articles are an amazing resource. That article in particular informed some of the design decisions in Oban:
1
4
Show replies
I liked your article, thanks for sharing it! 😊
besides avoiding long transactions, do you think the use of SKIP LOCKED instead of Advisory Locks (with Recursive CTE) could improve this issue?
1
Quote Tweet
@brandur Interesting article: brandur.org/postgres-queues. Would be curious to see experiments with PG 9.5's FOR UPDATE SKIP LOCKED clause
1
“I am going to make a …
database management system …
that is so …
irresistible from agglomeration effects “
2
Very useful work. To get arount this I avoid DELETEs and use partitions to periodically truncate old data from the queue. You can also avoid UPDATEs by storing a "consumer offset" on another small table a la Kafka
1
1
Thanks! I'm not quite prepared to say that you should stop doing that now. More like "there are some sharp corners that will be sanded down in Postgres 14, which is good news for users in a general kind of way".
1







