Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcBV8-0004EB-BX for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Jun 2019 16:25:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hcBV6-0000xV-Sp for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Jun 2019 16:25:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcBV6-0000uB-Im for pgsql-hackers@lists.postgresql.org; Sat, 15 Jun 2019 16:25:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcBV0-0004iP-HN for pgsql-hackers@lists.postgresql.org; Sat, 15 Jun 2019 16:25:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x5FGPda8021724; Sat, 15 Jun 2019 12:25:39 -0400 From: Tom Lane To: Alvaro Herrera cc: pgsql-hackers@lists.postgresql.org, alexk@hintbits.com Subject: Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock In-reply-to: <20190615034337.GA24560@alvherre.pgsql> References: <20190615034337.GA24560@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 14 Jun 2019 23:43:37 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21722.1560615939.1@sss.pgh.pa.us> Date: Sat, 15 Jun 2019 12:25:39 -0400 Message-ID: <21723.1560615939@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2019-Jun-14, Tom Lane wrote: >> BTW, after looking around a bit I wonder if this complaint isn't >> exposing an actual logic bug. Shouldn't skip_tuple_lock have >> a lifetime similar to first_time? > I think there are worse problems here. I tried the attached isolation > spec. Note that the only difference in the two permutations is that s0 > finishes earlier in one than the other; yet the first one works fine and > the second one hangs until killed by the 180s timeout. (s3 isn't > released for a reason I'm not sure I understand.) Ugh. > I don't think I'm going to have time to investigate this deeply over the > weekend, so I think the safest course of action is to revert this for > next week's set. +1. This is an old bug, we don't have to improve it for this release. regards, tom lane