When LIMIT 10 Means 500
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
A Postgres queue pickup using SELECT ... FOR UPDATE SKIP LOCKED with LIMIT 10 leased 500 tasks instead, because of a planner plan that re-runs the locking subquery and skips rows the statement has already updated.