zlacker

[return to "Choose Postgres queue technology"]
1. pauldd+f9[view] [source] 2023-09-24 21:33:30
>>bo0tzz+(OP)
USE. ADVISORY. LOCKS.

Do not use SKIP LOCKED unless it is a toy/low throughout.

Row locks require transactions and disk writes.

Advisory locks require neither. (However, you do have to stay inside the configurable memory budget.)

◧◩
2. sorent+Vi[view] [source] 2023-09-24 23:02:12
>>pauldd+f9
To do anything safe and interesting you’ll need transactions. Using SKIP LOCKED won’t be your bottleneck, your application will. Job queues are about side effects and the rest of your application needs to keep up.

Oban is able to run over 1m jobs a minute, and the ultimate bottleneck is throttling in application code to prevent thrashing the database: https://getoban.pro/articles/one-million-jobs-a-minute-with-...

[go to top]