Advisory locks are preferred for this anyways because holding a lot of SELECT FOR UPDATE doesn’t scale too well.
Edit: Actually I checked this again and apparently the advice has now changed to the inverse.
I need to do proper benchmarks on SELECT FOR UPDATE..SKIP LOCKED - but I suspect thousands per second. Some claimed higher than 10k/sec, but we'll see
I need to do proper benchmarks on SELECT FOR UPDATE..SKIP LOCKED - but I suspect thousands per second. Some claimed higher than 10k/sec, but we'll see