Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCjF0-0002z1-M1 for pgsql-admin@postgresql.org; Sat, 15 Sep 2012 03:40:23 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TCjEy-0006qM-GO for pgsql-admin@postgresql.org; Sat, 15 Sep 2012 03:40:21 +0000 Received: by pbbrr13 with SMTP id rr13so6528662pbb.19 for ; Fri, 14 Sep 2012 20:40:20 -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; bh=6fjlmaX/oGPy0XcQKPz8lf7bJNq0IrTdpczm6f1OOwM=; b=Yh+NsFTBxlYQDUxMwgygU6PGdW2hZ59jPiaR+hBmCxtZ0ucAMOUcmesLuxUFk/fro9 jM1fICeWefFMPmF6GeNEC6+xFzIKeDP04HIFUCUdRPGKFjfeff45jYvpa+ZeZ3wG224t w0IkZ6wDWgI7DLFQse0GNvT4Cmunr2C/swwoIU8fWU0Yo6AtLR+rJSBmsnp1FDm892mY d5pD3UkpctsgBa8eWiuhtpdSa42t0dddrQ04fl1Q4Jr7tYljqTp4N3bpw956lpI93IbH VzGvUHaq9hbPeRjtxMmyloJutqkuXBheh0sKLjiTl2IOrjKDA7+IHOvhIedGtgjZJqiW CzBg== Received: by 10.66.82.101 with SMTP id h5mr7179772pay.15.1347680419891; Fri, 14 Sep 2012 20:40:19 -0700 (PDT) Received: from [192.168.11.2] ([114.95.126.189]) by mx.google.com with ESMTPS id gi2sm2123544pbc.59.2012.09.14.20.40.12 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 20:40:17 -0700 (PDT) Message-ID: <5053F896.60005@gmail.com> Date: Sat, 15 Sep 2012 11:40:06 +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> <50535302.8080000@gmail.com> <20120914183915.GA5933@momjian.us> In-Reply-To: <20120914183915.GA5933@momjian.us> Content-Type: multipart/mixed; boundary="------------080003010508000703060303" X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201209/87 X-Sequence-Number: 40028 This is a multi-part message in MIME format. --------------080003010508000703060303 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 于 2012/9/15 2:39, Bruce Momjian 写道: > On Fri, Sep 14, 2012 at 11:53:38PM +0800, Rural Hunter wrote: >>>> 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. > Actually, I have a simpler idea. At the point where it fails, you can > run pg_dump --schema-only on the testdb database in the old and new > cluster and then diff those output files and email the result to us; it > should show the mismatch. I am not sure if the dumps will output the > objects in the same order, it might. > diff attached. --------------080003010508000703060303 Content-Type: application/x-zip-compressed; name="schmdiff.zip" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="schmdiff.zip" UEsDBBQAAAAIAMlcL0He/lsEYQYAAPRMAAAMAAAAc2NobWRpZmYub3V01Ztbr5NAFIXf/RW8 qYkm3AZKNSZen6omXh58mkxhbFEGEAaPx1/v3thj2ylUpgEyTbSantl8a9FhWLMPJa4dxfhy 76n1fPXp9Qfr0/MXq9cWyxn9zm9viirZvf/y/erz23fW9zSxPr7+ZL16/eb559UnK+e/5E+W Pbh/UEFhEK35j/vLZcU3ccbq+uGTe48fP7737Ajy/t3qyxQk4jpBjC+PSBD4qrNKpnHGj1ms j7UbTZmOo/EIz6y/fwCEL9Y7JvgSj/XE+nRbwn93h3tifYy3XLClVTbrLI2fWO9vcl4trbrJ f2+buyOcUUvXWbGZTnItbzM+h+gWdCTb7tNUzHQekTNM0XoeQeuhepoqm0MPYI70vPu8Wi2X 6zLesqr3GmjktqjmUPeXpC1QpnKeGd+CtOVtWb2lZcbSfA6Ne5q20NYexQPMIXRP0xa6aea5 epGjLS7nG1oW9Rz6dqhhK4xgMt7SuEhmuVT+0fSvl1qyzSwaETTwBlaV2S2NGzmHrDvWQGWc JbMpA9ZwZXUVzyEKMMP0TJJBvhZVI64uzLWqDUtzrSaj4lyryKQ81woyN9C18kxOdK1A0yNd K/IqMl2r1PBQ12o0OdW1Ag2Nda0203NdK9LAYNfqMjPZtdKMi3atKpOynbjKRp0wsFMnjGvV CdN6dcLsZp0wvVsnrqFdJ66mXyeuoGEnTO/YCYNbduIaenbC0KadMLdrJ4xs2wnT+nY5v6mv LtqhaMOSHUoyKtihIJNyHeoxN9ahOpNTHeozPdShxqvIdCjU8EiHEk1OdKjP0ECH0kzPc6jR wDiHssxMc6jMuDCHov6b5YjrejEJQqf7oUBacTjFirUzCWxfQyv9BwTHphHXs9HcQjGHKXfD K1o01fkQsqcdltC1hrVJWGAsBGMLohorWJUMpeBYPSvjHJ24vg/iI7d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