Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJOZr-0005Lv-Kr for pgsql-committers@arkaria.postgresql.org; Tue, 20 Dec 2016 17:51:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cJOZq-0002lp-MM for pgsql-committers@arkaria.postgresql.org; Tue, 20 Dec 2016 17:51:50 +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 1cJOZd-0002TQ-4i for pgsql-committers@postgresql.org; Tue, 20 Dec 2016 17:51:37 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cJOZa-0008AQ-Bh for pgsql-committers@postgresql.org; Tue, 20 Dec 2016 17:51:35 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id F3AA4206E7 for ; Tue, 20 Dec 2016 12:51:32 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Tue, 20 Dec 2016 12:51:32 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=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= smtpout; bh=JvXwxlUK29HWOHA4KKm1TzHEAnc=; b=lwxByaeMtjtoJ2stE39W 4RvunNz7gzJn9Ela0wP8cxOrd3tpPiYSOMzAcU8FfSA0Uq/7LPlGCsq1J5LDvLQr xw0QsXAn0F12knfTq/wM8Jbv6JGH5rtpV5X0jgbFsPYaJ48to6vbRdlqI0BuE2ud MBpupzZvtGYTaD2JhlTydWg= X-ME-Sender: X-Sasl-enc: 2DQwzyfD2B0LUqGDAnuX/WWo8EYk+yF8ZW9bR9+z84fZ 1482256292 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 A421B7E2B2 for ; Tue, 20 Dec 2016 12:51:32 -0500 (EST) Subject: Re: pgsql: Add pg_sequence system catalog To: pgsql-committers@postgresql.org References: <76ce2ca3-40f2-d291-eae2-17b599f29ba0@2ndquadrant.com> From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <87e0c1ae-d909-ec17-289c-2064747343da@2ndquadrant.com> Date: Tue, 20 Dec 2016 12:51:32 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 12/20/16 11:12 AM, Peter Eisentraut wrote: > create table test1 (id serial, t text); > ERROR: MINVALUE (4294967296) must be less than MAXVALUE (-4294967296) > > Normal sequence creation works. > > I think this error comes from the ALTER SEQUENCE OWNED BY call that the > serial column creation synthesizes. This would read the existing > sequence parameters from the catalog (AlterSequence()), then parse the > parameters (init_params()), where nothing changes except the owner. It > still runs the crosscheck min/max, which produces the error message. > The values complained about are 0x100000000 and 0xFFFFFFFF00000000, so > it's possible that it's reading the catalog off by 4 bytes or some bytes > are flipped somewhere else. It looks like the catalog data is written without padding (relid(4), start(8), inc(8), max(8), min(8), ...) but read with padding (relid(4), padding(4), start(8), inc(8), max(8), min(8), ...). The difference is that the write goes through heap_form_tuple but the read uses the Form_ struct. What is suspicious is this from the configure output: checking alignment of short... 2 checking alignment of int... 4 checking alignment of long... 4 checking alignment of long long int... 8 checking alignment of double... 4 We use DOUBLEALIGN to align int64 values, but on this platform, that is not correct. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers