Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCYDT-0002Cz-75 for pgsql-admin@postgresql.org; Fri, 14 Sep 2012 15:54:03 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCYDQ-0000XN-FZ for pgsql-admin@postgresql.org; Fri, 14 Sep 2012 15:54:02 +0000 Received: by pbbrr13 with SMTP id rr13so5822380pbb.19 for ; Fri, 14 Sep 2012 08:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=AuV5Mq41h1AN7ISVtUpfslSQtTbhqlptME+2GpjjF1s=; b=VpLAKazxo63gl0sQ8cP+meGixrVyXpAgemiKIpbmphYTPJEx+zeLqppALl2Gxor5sN BKyy7zId08rHzyqqqud/ENYVea7z5sQ6qO1kq4TT28+M3/8GxZDiRptpmneUBiBaoxTc VBZ8qqOdA+pjXlMhkmviqXm8kvX5rLaC0jr48DMpOUJQs4Ljkkmmlf7CijqePMWL6qd9 wSX63TqmDqqRdrLYo77ziObW2kCc7TBt7F3JtotbgmHkPiK752IqDmmtNVz79aPYT6en R5E10v3gJb+epLhQrQdk6kPYrVGun6woCWXRpS/oWlVzHrSyDCD97GhscuCK5lkLpUUb TqAQ== Received: by 10.68.229.6 with SMTP id sm6mr5509216pbc.120.1347638038529; Fri, 14 Sep 2012 08:53:58 -0700 (PDT) Received: from [192.168.11.2] ([114.95.126.189]) by mx.google.com with ESMTPS id it10sm1172995pbc.53.2012.09.14.08.53.45 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 08:53:56 -0700 (PDT) Message-ID: <50535302.8080000@gmail.com> Date: Fri, 14 Sep 2012 23:53:38 +0800 From: Rural Hunter User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Bruce Momjian CC: pgsql-admin@postgresql.org Subject: Re: pg_upgrade from 9.1.3 to 9.2 failed References: <5052C402.8020003@gmail.com> <20120914142616.GA11265@momjian.us> In-Reply-To: <20120914142616.GA11265@momjian.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201209/84 X-Sequence-Number: 40025 于2012年9月14日 22:26:16,Bruce Momjian写到: > On Fri, Sep 14, 2012 at 01:43:30PM +0800, Rural Hunter wrote: >> I am trying to test the upgrade from my 9.1.3 db to 9.2 on ubuntu >> 10.10 server. I got error below when run the pg_upgrade command. >> What can I do for this? >> >> $ /opt/PostgreSQL/9.2/bin/pg_upgrade -b /opt/PostgreSQL/9.1/bin -B >> /opt/PostgreSQL/9.2/bin -d /raid/pgsql -D /raid/pg92data >> Performing Consistency Checks >> ----------------------------- >> Checking current, bin, and data directories ok >> Checking cluster versions ok >> Checking database user is a superuser ok >> Checking for prepared transactions ok >> Checking for reg* system OID user data types ok >> Checking for contrib/isn with bigint-passing mismatch ok >> Creating catalog dump ok >> Checking for presence of required libraries ok >> Checking database user is a superuser ok >> Checking for prepared transactions ok >> >> If pg_upgrade fails after this point, you must re-initdb the >> new cluster before continuing. >> >> Performing Upgrade >> ------------------ >> Analyzing all rows in the new cluster ok >> Freezing all rows on the new cluster ok >> Deleting files from new pg_clog ok >> Copying old pg_clog to new server ok >> Setting next transaction ID for new cluster ok >> Resetting WAL archives ok >> Setting frozenxid counters in new cluster ok >> Creating databases in the new cluster ok >> Adding support functions to new cluster ok >> Restoring database schema to new cluster ok >> Removing support functions from new cluster ok >> Copying user relation files >> /raid/pgsql/base/6087920/6088238 >> old and new databases "testdb" have a different number of relations >> Failure, exiting > > That is an odd failure. That check was added in PG 9.1 and this is the > first time I am seeing this failure. > > The check is to make sure that once we have created all the user schema > details in the new cluster, that there are the same number of objects in > the new and old databases. > > Obviously there are a different number in your case here, but I don't > know why those would be different, and in fact, because we have never > hit this, there isn't even any debug output that shows the source of the > difference. > > If I send you a patch can you compile it and send back the debug output > it produces? > Yes sure, I will try to compile and retest with it.