Re: BUG #17141: SELECT LIMIT WITH TIES FOR UPDATE SKIP LOCKED returns wrong number of rows

From: Emil Iggland <emil(at)iggland(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17141: SELECT LIMIT WITH TIES FOR UPDATE SKIP LOCKED returns wrong number of rows
Date: 2021-08-11 17:25:48
Message-ID: 67eecc51-ef05-2990-b039-d4ddc8c63c8a@iggland.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

FWIW, the following query exhibits the behaviour that I expect, but
isn't really usable in production as I do not know how many rows to
expect per worker.

BEGIN;
SELECT * FROM queue
ORDER BY task DESC
LIMIT 2 OFFSET 0
FOR UPDATE SKIP LOCKED;
COMMIT;

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Emil Iggland 2021-08-11 17:29:02 Re: BUG #17141: SELECT LIMIT WITH TIES FOR UPDATE SKIP LOCKED returns wrong number of rows
Previous Message PG Bug reporting form 2021-08-11 16:38:15 BUG #17141: SELECT LIMIT WITH TIES FOR UPDATE SKIP LOCKED returns wrong number of rows