zlacker

[parent] [thread] 0 comments
1. valzam+(OP)[view] [source] 2023-09-25 00:34:24
The reason why you want to use skip locked is so that Postgres can automatically skip rows that are being concurrently accessed for updating the "status". You are right, if you update a "status" field you don't really need to worry about advisory locks and skipping rows that are locked but it still helps with performance if you have a decent amount of concurrent consumers polling the table.
[go to top]