Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5Zw3-0000Sa-5W for pgsql-bugs@arkaria.postgresql.org; Tue, 02 May 2017 15:41:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d5Zw2-0007V3-OQ for pgsql-bugs@arkaria.postgresql.org; Tue, 02 May 2017 15:41:54 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d5Zw2-0007Uu-F8 for pgsql-bugs@postgresql.org; Tue, 02 May 2017 15:41:54 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d5Zvz-0008L0-Mv for pgsql-bugs@postgresql.org; Tue, 02 May 2017 15:41:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 84B2420B35; Tue, 2 May 2017 11:41:50 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Tue, 02 May 2017 11:41:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=5cvDPoZoQjk3SzkBOI JWxlIta5EJiX49vwy11wUhahk=; b=O2uypafvuYAyF5ZpnjHBxbU1QeR66XCUqc xFO63y9dPBUOdd8iL9r+R4NoJuHcUvZGGIjZbf52+rfS5ggpgZxm26MQdx86Px1j SrQVsncJQS6WFAjr8J6aXLDXBQyQcXG6WBtUuGPnCGES98w61eeAXOhXZV6WhsiN syzuZ346SpM6aPbyYETJbXffoEkZflEoEJNvFljs5l8H6/SrF3Iux75V+6yXUmwA 8C4Nwn0ys7mxdjcIiYRa28MiIUgzdFQgzWPNguourjiI2CFK+fAAADce8uzd7KKM CufiwE7PSBlbjOIUbAiLjEefyrktM334eW7cKi0Yipp0P8o4rqKw== X-ME-Sender: X-Sasl-enc: vjNvx8RMEZwAAhdRyGRxhxEyGjTTZjyVzaQ9JOM8hV9y 1493739710 Received: from intern.anarazel.de (unknown [172.58.32.247]) by mail.messagingengine.com (Postfix) with ESMTPA id 2D9B124753; Tue, 2 May 2017 11:41:50 -0400 (EDT) Date: Tue, 2 May 2017 08:41:48 -0700 From: Andres Freund To: Peter Eisentraut Cc: Michael Paquier , Jason Petersen , PostgreSQL mailing lists Subject: Re: Concurrent ALTER SEQUENCE RESTART Regression Message-ID: <20170502154148.scik2utyqtkyfinb@alap3.anarazel.de> References: <16ed823b-44e4-dc51-3da9-a3d66b71ed5c@2ndquadrant.com> <9240bf94-44a8-671a-27bd-500eb868226a@2ndquadrant.com> <20170426174813.slaq6mka7v6xohap@alap3.anarazel.de> <99a009ea-1797-5b82-f3d3-eb4a5a8eb5dc@2ndquadrant.com> <20170427011258.2tpv55b6leqe2uva@alap3.anarazel.de> <1e5bb916-fd58-3995-851b-6875c6dd73eb@2ndquadrant.com> <20170427055211.jc5tblpguawbeqjq@alap3.anarazel.de> <87b349c1-3384-437e-01d3-173a69baf46f@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87b349c1-3384-437e-01d3-173a69baf46f@2ndquadrant.com> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2017-05-02 11:05:38 -0400, Peter Eisentraut wrote: > On 4/27/17 01:52, Andres Freund wrote: > > In contrast to > with the page lock held. But now we do log XLOG_SEQ_LOG, then unlock > > the buffer, and then do a CatalogTupleUpdate(). How is that correct? > > The change to the sequence data and the change to the catalog are two > separate operations. There is no need AFAICT for the latter to be done > while the former is locked or vice versa. You snipped the salient part of my response: > Imagine two of these running concurrently - you might end up with > A:XLogInsert B:XLogInsert B:CatalogTupleUpdate A:CatalogTupleUpdate Which'll lead, yet another avenue, to sequence states that aren't in sync with the catalog. - Andres -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs