Typed-tables patch broke pg_upgrade - Mailing list pgsql-hackers

From Tom Lane
Subject Typed-tables patch broke pg_upgrade
Date
Msg-id 11842.1297295013@sss.pgh.pa.us
Whole thread Raw
Responses Re: Typed-tables patch broke pg_upgrade  (Bruce Momjian <bruce@momjian.us>)
Re: Typed-tables patch broke pg_upgrade  (Peter Eisentraut <peter_e@gmx.net>)
Re: Typed-tables patch broke pg_upgrade  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
I find that pg_upgrade fails in HEAD when asked to do a 9.1-to-9.1
upgrade of the regression database.  It gets to this bit of the
restore script:

CREATE TABLE test_tbl2 OF public.test_type2;

-- For binary upgrade, recreate dropped column.
UPDATE pg_catalog.pg_attribute
SET attlen = -1, attalign = 'i', attbyval = false
WHERE attname = '........pg.dropped.2........' AND attrelid = 'test_tbl2'::pg_catalog.regclass;
ALTER TABLE ONLY test_tbl2 DROP COLUMN "........pg.dropped.2........";

and fails with 

ERROR:  cannot drop column from typed table

which probably is because test_type2 has a dropped column.

Somebody has failed to think through something, because if this state of
affairs was allowed to be created during the regression tests, why
should we not be able to restore it?

(pg_upgrade's ENUM support is broken too, but at least that one is a
one-line fix.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: query execution question
Next
From: Greg Stark
Date:
Subject: Re: new clang report