pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Christensen <david@endpoint.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16676: SELECT ... FETCH FIRST ROW WITH TIES FOR UPDATE SKIP LOCKED locks rows it doesn't return
Date: Mon, 19 Oct 2020 18:59:21 -0500
Message-ID: <7B98FC76-00EE-4441-AF10-A4A805DC021E@endpoint.com> (raw)
In-Reply-To: <565608.1603148830@sss.pgh.pa.us>
References: <565608.1603148830@sss.pgh.pa.us>

> On Oct 19, 2020, at 6:07 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> David Christensen <david@endpoint.com> writes:
>> Proposed fix:
>> Reorder Limit/LockRows nodes to prevent locking extra tuples in FETCH FIRST WITH TIES
> 
> Isn't that going to break more cases than it fixes?

In the case of Limit, isn’t LockRows supposed to only lock the number of actual rows returned?

What are the scenarios that this might break and do you have any ideas for alternate fixes?

David




view thread (10+ messages)  latest in thread

Message-ID: <7B98FC76-00EE-4441-AF10-A4A805DC021E@endpoint.com>
Permalink:  ../7B98FC76-00EE-4441-AF10-A4A805DC021E@endpoint.com/
Also on:    postgresql.org/message-id/7B98FC76-00EE-4441-AF10-A4A805DC021E@endpoint.com

 · 

reply

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: david@endpoint.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16676: SELECT ... FETCH FIRST ROW WITH TIES FOR UPDATE SKIP LOCKED locks rows it doesn't return
  In-Reply-To: <7B98FC76-00EE-4441-AF10-A4A805DC021E@endpoint.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