Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9BZZ-00008U-QJ for pgsql-hackers@arkaria.postgresql.org; Fri, 12 May 2017 14:29:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d9BZZ-0003dF-D9 for pgsql-hackers@arkaria.postgresql.org; Fri, 12 May 2017 14:29:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d9BY2-0007l2-4y for pgsql-hackers@postgresql.org; Fri, 12 May 2017 14:28:02 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d9BXz-0004xj-GY for pgsql-hackers@postgresql.org; Fri, 12 May 2017 14:28:01 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 77265209FF; Fri, 12 May 2017 10:27:58 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Fri, 12 May 2017 10:27:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=aivQc7dpbJBCqNNGwOae1WDffUVTEBvjcNE85yCNSMc=; b=ipzD2bQe GXarH010bWpa2Xgu5i15HnGZsPWi2kEu2I5Xpee9IaBjyihbqQKQpv3zCicVFrye NbXN5uMZeYc0O0jH1Pf5j7IYKkSyRc1NW7jalRpjL9L9Iu+4SfOZOG4b7wfUNg2r YeuLtzQMTom2fsed8/F0qNFEuHO9kgAxXw7OZR/Vu9sxseJlPYzNDeH3aSWqEEyF cbAUUi6RK/W4fzFoeOoJAb16BemZN6H5gxdjHgUKzwkhPH6It6kOu/gqEc1jzbMb fWlsoIxOuber6mjkJ+WjeaqACA7N1WQnJY9vAHN6yRGK9L8Y1kNBK+vfNX1Pp7fN JnVn2U9NMhSlvw== X-ME-Sender: X-Sasl-enc: FZmMq9T78KcZdt+T+DyRxTmXFEsVsB84ZZ3D/Ec0JyWm 1494599278 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 2434D24A1F; Fri, 12 May 2017 10:27:58 -0400 (EDT) Subject: Re: [BUGS] Concurrent ALTER SEQUENCE RESTART Regression To: Andres Freund , Tom Lane References: <20170430080517.GA811193@rfd.leadboat.com> <59aeb834-b113-6769-bfe4-65f2f8c875e3@2ndquadrant.com> <20170507234334.yimkp6aq2o43wtt2@alap3.anarazel.de> <4521f870-bb1f-1b29-3b3f-42419696efe7@2ndquadrant.com> <20d59e42-4a08-fa34-29df-9f54b3ef5ba7@2ndquadrant.com> <2913.1494426542@sss.pgh.pa.us> <20170510162450.bzfktkeexezepf6c@alap3.anarazel.de> <90255529-1de1-0aad-c545-f75d08479a9a@2ndquadrant.com> <8863.1494537678@sss.pgh.pa.us> <20170511212839.b6i6xccdv5slrttx@alap3.anarazel.de> Cc: Petr Jelinek , pgsql-hackers@postgresql.org, Noah Misch , Jason Petersen , Michael Paquier From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Fri, 12 May 2017 10:28:10 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170511212839.b6i6xccdv5slrttx@alap3.anarazel.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 5/11/17 17:28, Andres Freund wrote: > Isn't that pretty much the point? The whole open_share_lock() > optimization looks like it really only can make a difference with > subtransactions? Yeah that confused me too. That keep-the-lock-for-the-whole-transaction logic was introduced in a2597ef17958e75e7ba26507dc407249cc9e7134 around 7.3, way before subtransactions (8.0). The point there was apparently just to avoid hitting the lock manager on subsequent calls. That code has since been moved around end refactored many times. When subtransactions were introduced, the current logic of keeping the lock across subtransactions was added in order to keep the original intent. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers