Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOVo4-0003ox-KZ for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jan 2017 20:35:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cOVo4-0005dg-1W for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Jan 2017 20:35:40 +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 1cOVo2-0005cq-Mp for pgsql-hackers@postgresql.org; Tue, 03 Jan 2017 20:35:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cOVo0-000583-77 for pgsql-hackers@postgresql.org; Tue, 03 Jan 2017 20:35:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v03KZYlj031171; Tue, 3 Jan 2017 15:35:34 -0500 From: Tom Lane To: Justin Pryzby cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: ALTER TABLE .. ALTER COLUMN .. ERROR: attribute .. has wrong type In-reply-to: <20170103202919.GU32031@telsasoft.com> References: <20170103003240.GM32031@telsasoft.com> <20170103165903.GP32031@telsasoft.com> <20170103185742.GQ32031@telsasoft.com> <28476.1483471956@sss.pgh.pa.us> <20170103194604.GR32031@telsasoft.com> <29101.1483473021@sss.pgh.pa.us> <20170103195709.GT32031@telsasoft.com> <30539.1483474695@sss.pgh.pa.us> <20170103202919.GU32031@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Tue, 03 Jan 2017 14:29:19 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31169.1483475734.1@sss.pgh.pa.us> Date: Tue, 03 Jan 2017 15:35:34 -0500 Message-ID: <31170.1483475734@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) 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 Justin Pryzby writes: > On Tue, Jan 03, 2017 at 03:18:15PM -0500, Tom Lane wrote: >> I'm wondering if this represents some sort of out-of-sync condition >> between the table and its child tables. We can't actually tell from >> this trace which table is being processed. Could you try, from this >> breakpoint, >> >> f 3 >> p oldrel->rd_rel->relname > (gdb) p oldrel->rd_rel->relname > $1 = {data = "eric_umts_rnc_utrancell_201701", '\000' } Right. So I bet that if you check the attnum of pmsumpacketlatency_000 in eric_umts_rnc_utrancell_metrics, you'll find it's different from that in eric_umts_rnc_utrancell_201701, and that the attribute having that attnum in eric_umts_rnc_utrancell_201701 has type smallint not int. This is an expected situation in some situations where you ALTER existing inheritance hierarchies; it's a bug that ALTER COLUMN is failing to cope. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers