Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 122631337C14 for ; Fri, 25 Mar 2011 12:30:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 68009-01 for ; Fri, 25 Mar 2011 15:30:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id BF7AF1337BD9 for ; Fri, 25 Mar 2011 12:30:24 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p2PFUM0l004620; Fri, 25 Mar 2011 11:30:22 -0400 (EDT) To: "alex" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5950: backend terminating after altering table In-reply-to: <201103251337.p2PDbtWQ053513@wwwmaster.postgresql.org> References: <201103251337.p2PDbtWQ053513@wwwmaster.postgresql.org> Comments: In-reply-to "alex" message dated "Fri, 25 Mar 2011 13:37:55 +0000" Date: Fri, 25 Mar 2011 11:30:22 -0400 Message-ID: <4619.1301067022@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/331 X-Sequence-Number: 29841 "alex" writes: > 1. create table t ( > ); > 2. alter table t add childs t; > 3. alter table t add id serial not null primary key; > server closed the connection unexpectedly Hmm. This seems to be fixed in HEAD: regression=# create table t ( regression(# ); CREATE TABLE regression=# alter table t add childs t; ALTER TABLE regression=# alter table t add id serial not null primary key; NOTICE: ALTER TABLE will create implicit sequence "t_id_seq" for serial column "t.id" NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "t_pkey" for table "t" ERROR: cannot alter table "t" because column "t"."childs" uses its rowtype Interestingly, 8.2 also says the same --- but 8.3, 8.4, and 9.0 crash. Looks like we broke the error check somewhere along the way, and whoever fixed it neglected to back-patch. regards, tom lane