From: Emil Iggland <emil@iggland.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17141: SELECT LIMIT WITH TIES FOR UPDATE SKIP LOCKED returns wrong number of rows
Date: Wed, 11 Aug 2021 19:25:48 +0200
Message-ID: <67eecc51-ef05-2990-b039-d4ddc8c63c8a@iggland.com> (raw)
In-Reply-To: <17141-913d78b9675aac8e@postgresql.org>
References: <17141-913d78b9675aac8e@postgresql.org>
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;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: emil@iggland.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17141: SELECT LIMIT WITH TIES FOR UPDATE SKIP LOCKED returns wrong number of rows
In-Reply-To: <67eecc51-ef05-2990-b039-d4ddc8c63c8a@iggland.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox