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 1gfpSQ-0001di-CO for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Jan 2019 17:09:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gfpSO-0000mj-9e for pgsql-bugs@arkaria.postgresql.org; Sat, 05 Jan 2019 17:09:56 +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 1gfpSM-0000Z9-7y for pgsql-bugs@lists.postgresql.org; Sat, 05 Jan 2019 17:09:56 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gfpSD-0002X1-AI for pgsql-bugs@lists.postgresql.org; Sat, 05 Jan 2019 17:09:52 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5E4E521C1C; Sat, 5 Jan 2019 12:09:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 05 Jan 2019 12:09:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=F2jfFvKJuL5XaR1pO+6PeHfukLZ iqGL26jvOh6vEbDg=; b=iYhpsUsGTmSdu03Dw6Wbk+IKfcK6brmOOBAhrW4+kd0 B23u43I2nuwVMiDeTaSWSeXKFgMhufQp0vIMUNmndUHGcHDkGDnYdzavU3DzKngm 6dU+ICVPcOz0omLTGxZPGEDTFnRvzZYEKYYzrJe3iQq/f+hWk26kobIXoJLqdkP+ wacyZCYlMnkvU5ywAw7q1MM9AwCR1SNTewXb9Z20aIOxfbpgp14+vsKrSmxeOxsA QeuJZE1yLB0YcLZnfDBE8R7YmRNXmuCpr4X26Hi7C7DJpX2k4Etl5sQfhA32cftN lv5kD7vnLvOgXpls0Xyzp4kZVci8Dkt1JCC5ESo2e9g== 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-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=F2jfFv KJuL5XaR1pO+6PeHfukLZiqGL26jvOh6vEbDg=; b=IQMaeb8rpIEaUJKhy+yPSC aKXyp7Abkfyk41cy5JrFJAGngMgjCvob4S1LDdaUuZZyfJPaYbjJNvm7pewSNlvq HgU1kPvU88VF1waUH9AgjrYK5PnH0REPlzeY/iGHvyKG9nx3XPVPnuErvVd1b7wL L4dhWbZlb5JYvjgFDFRIVo5jrBk+HIixPRPiE5cCRMijVMdXBhzekymuVycgOrcj NjCG/UHwBy7YrvS36Vi01flSDp6LdB10h1hPhlRe7fQVbYsj78neP+865ybX/Gqr nd+TQt1W5Qft4b3L9Ur2Xw8Y53MzF3XTO4UW02+JuMzY7nYHBKFF/c8Ddefkn3iQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrvdefgdelleculddtuddrgedtkedrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkpheple ekrddvuddtrddugedtrddujedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgv shesrghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 6A55DE4599; Sat, 5 Jan 2019 12:09:42 -0500 (EST) Date: Sat, 5 Jan 2019 09:09:40 -0800 From: Andres Freund To: Dean Rasheed , Andrew Dunstan Cc: Tom Lane , Dmitry Molotkov , Alvaro Herrera , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15446: Crash on ALTER TABLE Message-ID: <20190105170940.2qrbilpxmmxyf4tr@alap3.anarazel.de> References: <20181027144557.6uil4sqrvor25m3x@alvherre.pgsql> <20190104211700.jloztzladojvpxij@alap3.anarazel.de> <20190104222542.5zcrjv5p24ssw7te@alap3.anarazel.de> <14358.1546648708@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-01-05 12:11:45 +0000, Dean Rasheed wrote: > It looks like the problem was introduced in PG11 by 16828d5c02 (Fast > ALTER TABLE ADD COLUMN with a non-NULL default). The first ALTER TABLE > adds a new column with a non-null default, setting atthasmissing and > attmissingval. Then the second ALTER TABLE changes the type of the new > column, but it fails to update attmissingval to match, and thus it > falls over when trying to re-open the relation because the value in > attmissingval is no longer compatible with the attribute type. Paging Dr Dunstan. Greetings, Andres Freund