Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 902E71337BA1 for ; Thu, 24 Feb 2011 04:27:59 -0400 (AST) 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 18136-01 for ; Thu, 24 Feb 2011 08:27:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from collab.sm-wg.net (collab.sm-wg.net [86.43.106.231]) by mail.postgresql.org (Postfix) with ESMTP id D3B2B1337B9E for ; Thu, 24 Feb 2011 04:27:51 -0400 (AST) Received: from collab.sm-wg.net (localhost [127.0.0.1]) by collab.sm-wg.net (Postfix) with ESMTP id 470B32E7A401; Thu, 24 Feb 2011 08:27:50 +0000 (GMT) Date: Thu, 24 Feb 2011 08:27:50 +0000 To: Bruce Momjian From: Bernhard Rohrer Cc: Bernhard Schrader , pgsql-admin@postgresql.org Subject: Re: PG_update to 9.0.4 in ubuntu lucid 64 Message-ID: <0b7f3d7bf2db6c664ff89ce47b13ab2c@collab.sm-wg.net> X-Priority: 3 X-Mailer: PHPMailer 5.1 (phpmailer.sourceforge.net) X-Mailer: FeLaMiMail In-Reply-To: <201102232337.p1NNbfc05564@momjian.us> Organization: Bernhard Rohrer Consulting MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/209 X-Sequence-Number: 36848 =20 thanks guys It'll be a few days before i can do that, but will come back and report. Ca= n i use the dump file that pg_upgrade produced? it is there after all. thanks B ----------------original message----------------- From: "Bruce Momjian"=20 To: "Bruce Momjian"=20 CC: "Bernhard Rohrer" graylion@sm-wg.net , "Bernhard Schrader" bernhard.sch= rader@innogames.de , pgsql-admin@postgresql.org=20 Date: Wed, 23 Feb 2011 18:37:40 -0500 (EST) ------------------------------------------------- =20 =20 > Bruce Momjian wrote: >> Bernhard Rohrer wrote: >> > Thanks that worked. :) >> >=20 >> > After this and some more entertainment we are now here: >> >=20 >> > Restoring database schema to new cluster >> > psql:/usr/lib/postgresql/9.0/bin/pg_upgrade_dump_db.sql:24606:=20 >> ERROR: >> > column "name" in child table must be marked NOT NULL >> >=20 >> >=20 >> > There were problems executing "/usr/lib/postgresql/9.0/bin/psql"=20 >> --set >> > ON_ERROR_STOP=3Don --no-psqlrc --port 5432 --username "postgres" -f >> > "/usr/lib/postgresql/9.0/bin/pg_upgrade_dump_db.sql" --dbname=20 >> template1 >> > >> "/dev/null" >> >=20 >> >=20 >> > does that mean line24606? it looks like manual edititng required ... >>=20 >> I checked the source code and the check it is failing on has this commen= t: >>=20 >> /* >> * Check columns in child table match up with columns in parent, and incr= ement >> * their attinhcount. >> * >> * Called by ATExecAddInherit >> * >> * Currently all parent columns must be found in child. Missing columns a= re an >> * error. One day we might consider creating new columns like CREATE TABL= E >> * does. However, that is widely unpopular --- in the common use case of >> * partitioned tables it's a foot-gun. >> * >> * The data type must match exactly. If the parent column is NOT NULL the= n >> * the child must be as well. Defaults are not compared, however. >> */ >> MergeAttributesIntoExisting()=20 >>=20 >> It seems somehow your schema is corrupt --- it is pg_dump that is >> failing, and threfore pg_upgrade. We need to find out how you got into >> that state. Do a manual pg_dump and see what table is being referenced >> on line 24606. It is saying that that table has a 'name' column that is >> not marked NOT NULL, while the parent table does have a NOT NULL >> specification. Those should match. I don't remember hearing about a >> bug in that area of the code. >=20 > FYI, you can easily reproduce the failure by trying to restore a pg_dump > --schema dump into an empty database. >=20 > --=20 > Bruce Momjian=20 http://momjian.us > EnterpriseDB http://enterprisedb.com >=20 > + It's impossible for everything to be true. + >=20 --=20 ------------- Bernhard Rohrer Consulting 529 Howth Road Dublin 5, Ireland +353 87 7907 134