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 1hboHt-0008De-96 for pgsql-committers@arkaria.postgresql.org; Fri, 14 Jun 2019 15:38:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hboGu-0000LV-5S for pgsql-committers@arkaria.postgresql.org; Fri, 14 Jun 2019 15:37:44 +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 1hboGt-0000IL-TC for pgsql-committers@lists.postgresql.org; Fri, 14 Jun 2019 15:37:43 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hboGq-0002zL-TI for pgsql-committers@lists.postgresql.org; Fri, 14 Jun 2019 15:37:43 +0000 Received: by mail-qk1-x741.google.com with SMTP id p144so1908900qke.11 for ; Fri, 14 Jun 2019 08:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=3NBYdkN3AEoHC8eJ0e78eEd/PJdowqtIQ5X+IjPCZOE=; b=g3mTXD3H8lOYErzsmNEnb6LB5fdSwdg01UgARXrKe45pUjuWL6UUtfHzSuwWevlBzz z/O4aZ+YfoNWH2Dt/k7B4V/hpWDZM0il1UnNseyaBqh86jgivvBo8X6WfmT+qY0pkWdD mLNbhJSgQgedZVpJeddbtxXIk90RyUjdzom1Z4jz+LRyW+CogSek2JSzSa4sVW5ucksR KeWegInDMigYO1FTD1rgJS2I4sqo9ivlzw9uHpITWOcODP2qsy0BLqhY3VoAlfvsylQN 3SAFy+DOiPiTNgqBUMjdsdJnNVVXA9EWHQ8PXTAwGHG88RuG+YPyLQkX22uHtYw7db2i bzlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=3NBYdkN3AEoHC8eJ0e78eEd/PJdowqtIQ5X+IjPCZOE=; b=e2NC5spYCrG12EGWAOwXhT4sx/BcO3TkSuPB5nBRUO07nAW/EhW18LOT2lqABYvbQs 0Te1jR2UUUsQKTQU0w33IJcwMLu2FXFfyE0sDTbHWbfepkePR0KK58rOK0NfolhiYszS kzwaqzw0RkYgMEYDqhbSxkBCS+tPeMPK6NrXyM5p8mMZ79C8EwpJ+gWehLE8cUR/FFou LYSC8O+uuP5fquqHHeuP5mPkFSP22g6VdgUfoJJDZbcIpLlROxLpU2TzypcUASeu50c3 xTFPhr8+to0/3BNT5U6jdGrCST3fOIqGdf/cbf8a303YDY60TB5Kv+RmdYIpMLp3d39i 8OVA== X-Gm-Message-State: APjAAAU09sH+RiP/bY671j9LHPoROnI5phWA1Oc+OJDZtD0DjRIuAgiQ Lil+0X05IcGCj6TIUXN5+fYCwg== X-Google-Smtp-Source: APXvYqxXRPC8Q6w8lNwDsQNMVPlYtYl5eFcHZSYQpS0HPAb62bw/Eq+5j4x3cKmA5P2s+B2OVFekFQ== X-Received: by 2002:a05:620a:14a1:: with SMTP id x1mr76551961qkj.164.1560526658778; Fri, 14 Jun 2019 08:37:38 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.48.227]) by smtp.gmail.com with ESMTPSA id 102sm1418816qte.52.2019.06.14.08.37.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 14 Jun 2019 08:37:38 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 5565E120BC1; Fri, 14 Jun 2019 11:37:36 -0400 (-04) Date: Fri, 14 Jun 2019 11:37:36 -0400 From: Alvaro Herrera To: Tom Lane Cc: pgsql-committers@lists.postgresql.org, Etsuro Fujita Subject: Re: pgsql: Avoid spurious deadlocks when upgrading a tuple lock Message-ID: <20190614153736.GA21626@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <28491.1560526373@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jun-14, Tom Lane wrote: > 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? I think you're right. I should come up with a test case that exercises that case. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services