Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35yq-0002x0-6u for pgsql-bugs@arkaria.postgresql.org; Tue, 25 Apr 2017 19:18:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d35yp-0001b7-22 for pgsql-bugs@arkaria.postgresql.org; Tue, 25 Apr 2017 19:18:31 +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 1d35y7-0007ZX-2z for pgsql-bugs@postgresql.org; Tue, 25 Apr 2017 19:17:47 +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 1d35y1-0004Y9-MX for pgsql-bugs@postgresql.org; Tue, 25 Apr 2017 19:17:46 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 0117F2126E; Tue, 25 Apr 2017 15:17:39 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Tue, 25 Apr 2017 15:17:40 -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=BDW7LEX3jUL2+SHPpRzxbYjk0bUBm/TuzU8Q7DHi8TM=; b=NR67uz3l BuBUFZEasfG7CJJVh1gPVUrbmrdVbPG410J6wpSi8RWq1xf7O4JIrP3gUAsBxSio n0Ql3kkKJ53GVa/E4HZoSyRXmBNayosik/X7Jj2Fsd6cN3mZyZLrAYBo8w+xYEGD EY36z07+Sr1DRNGPBfw/VlT+torXVblgftssN8jH9ZR8NNq/qI/r0/I2E3r0zv0V eUcNhYfC3dXUyEYLmjUxodbrXLk7rvmiGsBRV2GQrQS56eDKdN9QJCd5M5D29FCN uPVLh9DSsOpVgRhkmqxKeLvcxrNXL0w2Gj4x7JcizrEpDlbA6JhNgzMlKF3bszfE vzAK4SGdCL4DlA== X-ME-Sender: X-Sasl-enc: eJz9jQDJxViXd8HAjA7LQNfjMcfzwWWskdD76Qm7Y+SV 1493147859 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 B67DC7E712; Tue, 25 Apr 2017 15:17:39 -0400 (EDT) Subject: Re: Concurrent ALTER SEQUENCE RESTART Regression To: Michael Paquier , Jason Petersen References: Cc: PostgreSQL mailing lists From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <16ed823b-44e4-dc51-3da9-a3d66b71ed5c@2ndquadrant.com> Date: Tue, 25 Apr 2017 15:17:39 -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: Content-Type: text/plain; charset=utf-8 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-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 4/25/17 00:26, Michael Paquier wrote: > So things are broken for sequences since commit 1753b1b0 (adding Peter > in CC) that has changed the way sequence metadata is handled. The > failure happens in CatalogTupleUpdate() which uses > simple_heap_update() that caller can only use if updates are > concurrent safe. But since 1753b1b0 that is not true as the sequence > is locked with AccessShareLock. I think you are confusing locking the sequence versus locking the pg_sequence catalog. The error is coming from CatalogTupleUpdate() on pg_sequence, which is locked using RowExclusiveLock, which is what we use for most DDL commands doing catalog changes. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs