zlacker

[return to "Choose Postgres queue technology"]
1. sgarla+qn1[view] [source] 2023-09-25 11:31:33
>>bo0tzz+(OP)
I just want to commend OP - if they’re here - for choosing an int64 for job IDs, and MD5 for hashing the payload in Neoq, the job library linked [0] from the article.

Especially given the emphasis on YAGNI, you don’t need a UUID primary key, and all of its problems they bring for B+trees (that thing RDBMS is built on), nor do you need the collision resistance of SHA256 - the odds of you creating a dupe job hash with MD5 are vanishingly small.

As to the actual topic, it’s fine IFF you carefully monitor for accumulating dead tuples, and adjust auto-vacuum for that table as necessary. While not something you’d run into at the start, at a modest scale you may start to see issues. May. You may also opt to switch to Redis or something else before that point anyway.

EDIT: if you choose ULID, UUIDv7, or some other k-sortable key, the problem isn’t nearly as bad, but you still don’t need it in this situation. Save yourself 8 bytes per key.

[0]: https://github.com/acaloiaro/neoq

◧◩
2. acaloi+h02[view] [source] 2023-09-25 14:38:04
>>sgarla+qn1
Thanks! I'd like to believe that those decisions were incredibly thoughtful, but they're largely Bob Rossian happy accidents.
[go to top]