Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 330A7B5DBF7 for ; Thu, 25 Aug 2011 17:34:14 -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 22100-01 for ; Thu, 25 Aug 2011 20:34:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id EF839B5D803 for ; Thu, 25 Aug 2011 17:34:05 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id p7PKX7629929; Thu, 25 Aug 2011 16:33:07 -0400 (EDT) From: Bruce Momjian Message-Id: <201108252033.p7PKX7629929@momjian.us> Subject: Re: [GENERAL] pg_upgrade problem In-Reply-To: <20110825195757.GA28394@depesz.com> To: depesz@depesz.com Date: Thu, 25 Aug 2011 16:33:07 -0400 (EDT) CC: PostgreSQL-development X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.432 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.532 X-Spam-Level: X-Archive-Number: 201108/1147 X-Sequence-Number: 193902 hubert depesz lubaczewski wrote: > hi > > I have 8.3.11 database, ~ 600GB in size. > > I want to upgrade it to 9.0. > > First, I tried with 9.0.4, and when I hit problem (the same) I tried > git, head of 9.0 branch. Good. > pg_upgrade_dump_db.sql- > pg_upgrade_dump_db.sql--- For binary upgrade, must preserve relfilenodes > pg_upgrade_dump_db.sql-SELECT binary_upgrade.set_next_heap_relfilenode('71637068'::pg_catalog.oid); > pg_upgrade_dump_db.sql:SELECT binary_upgrade.set_next_toast_relfilenode('71637071'::pg_catalog.oid); > pg_upgrade_dump_db.sql-SELECT binary_upgrade.set_next_index_relfilenode('71637073'::pg_catalog.oid); > pg_upgrade_dump_db.sql- > pg_upgrade_dump_db.sql-CREATE TABLE actions ( > -- > pg_upgrade.log-linking /var/postgresql/6666/base/113953649/2613 to /var/postgresql/6666-9.0/base/11826/11790 > pg_upgrade.log- /var/postgresql/6666/base/113953649/2683 > pg_upgrade.log-linking /var/postgresql/6666/base/113953649/2683 to /var/postgresql/6666-9.0/base/11826/11792 > pg_upgrade.log:Could not find 71637071 in old cluster The problem appears to be that the Postgres catalogs think there is a toast table for 'actions', while the file system doesn't seem to have such a file. I can you look in pg_class and verify that? SELECT reltoastrelid FROM pg_class WHERE relname = 'actions'; Then look in the file system to see if there is a matching file. > One more thing - one of earlier tests actually worked through > pg_upgrade, but when running vacuumdb -az on newly started 9.0.4, I got > error about missing transaction/clog - don't remember exactly what it > was, though. THere was a bug in how how pg_upgrade worked in pre-9.0.4 --- could it have been that? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +