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 1hboCK-0007pY-Ks for pgsql-committers@arkaria.postgresql.org; Fri, 14 Jun 2019 15:33:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hboCJ-0005ci-EM for pgsql-committers@arkaria.postgresql.org; Fri, 14 Jun 2019 15:32:59 +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 1hboCJ-0005VC-42 for pgsql-committers@lists.postgresql.org; Fri, 14 Jun 2019 15:32:59 +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 1hboCH-0002ug-3V for pgsql-committers@lists.postgresql.org; Fri, 14 Jun 2019 15:32:58 +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 x5EFWrIu028492; Fri, 14 Jun 2019 11:32:53 -0400 From: Tom Lane To: Alvaro Herrera cc: pgsql-committers@lists.postgresql.org, Etsuro Fujita Subject: Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock In-reply-to: <28311.1560526116@sss.pgh.pa.us> References: <20190614151109.GA12229@alvherre.pgsql> <28311.1560526116@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 14 Jun 2019 11:28:36 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28490.1560526373.1@sss.pgh.pa.us> Date: Fri, 14 Jun 2019 11:32:53 -0400 Message-ID: <28491.1560526373@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: >> Hm, I don't get that warning. Does this patch silence it, please? > Uh, no patch attached? But initializing the variable where it's > declared would certainly silence it. 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? regards, tom lane