Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUeFM-00043g-N8 for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Oct 2020 23:07:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kUeFI-0007jR-P1 for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Oct 2020 23:07:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUeFI-0007jE-IX for pgsql-bugs@lists.postgresql.org; Mon, 19 Oct 2020 23:07:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUeFF-0000sU-V0 for pgsql-bugs@lists.postgresql.org; Mon, 19 Oct 2020 23:07:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09JN7AhE565609; Mon, 19 Oct 2020 19:07:11 -0400 From: Tom Lane To: David Christensen 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 In-reply-to: <4143F72C-37BA-43B3-A768-259907CBA985@endpoint.com> References: <16676-fd62c3c835880da6@postgresql.org> <4143F72C-37BA-43B3-A768-259907CBA985@endpoint.com> Comments: In-reply-to David Christensen message dated "Mon, 19 Oct 2020 17:02:04 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <565607.1603148830.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 19 Oct 2020 19:07:10 -0400 Message-ID: <565608.1603148830@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Christensen writes: > Proposed fix: > Reorder Limit/LockRows nodes to prevent locking extra tuples in FETCH FI= RST WITH TIES Isn't that going to break more cases than it fixes? regards, tom lane