Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TFH8J-0003vW-Dl for pgsql-hackers@postgresql.org; Sat, 22 Sep 2012 04:15:59 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TFH8G-0005wn-0A for pgsql-hackers@postgresql.org; Sat, 22 Sep 2012 04:15:58 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1TFH8D-0007xv-U9; Sat, 22 Sep 2012 00:15:53 -0400 Date: Sat, 22 Sep 2012 00:15:53 -0400 From: Bruce Momjian To: Rural Hunter Cc: PostgreSQL-development , Tom Lane Subject: Re: [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed Message-ID: <20120922041553.GA22183@momjian.us> References: <5053F896.60005@gmail.com> <20120915180603.GA20907@momjian.us> <505557CD.8090304@gmail.com> <20120916171746.GA24907@momjian.us> <28666.1347833056@sss.pgh.pa.us> <20120917043236.GA20123@momjian.us> <5056AF29.3040903@gmail.com> <20120917210723.GA30394@momjian.us> <20120918232239.GA2014@momjian.us> <505C307E.20501@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <505C307E.20501@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.4 (--) X-Archive-Number: 201209/800 X-Sequence-Number: 213828 On Fri, Sep 21, 2012 at 05:16:46PM +0800, Rural Hunter wrote: > >>I am thinking this query needs to be split apart into a UNION where the > >>second part handles TOAST tables and looks at the schema of the _owner_ > >>of the TOAST table. Needs to be backpatched too. > >OK, I am at a conference now so will not be able to write-up a patch > >until perhaps next week. You can drop the information schema in the old > >database and pg_upgrade should run fine. I will test your failure once > >I create a patch. > > > OK. I will try. I also found some problems on initdb when re-init my > pg9.2 db. > 1. initdb doesn't create the pg_log dir so pg can not be started > after initdb before I create the dir manually. > 2. The case issue of db charset name. I installed pg9.1 and pg9.2 > with zh_CN.UTF8. But somehow it seems the actual chaset name is > stored with lowercase 'zh_CN.utf8' during the install. In this case, > I can run the pg_upgrade without problem since they are both > lowercase. But when I re-init pg9.2 with option '-E zh_CN.UTF8', > pg_upgrade will fail and report that encoding/charset mis-match: one > is uppercase and another is lowercase. If I run initdb with '-E > zh_CN.utf8', it will tell me there is no such charset in the system. > I found a workaround to run initdb with '--lc-collate=zh_CN.utf8 > --lc-ctype=zh_CN.utf8 --lc-messages=zh_CN.utf8 > --lc-monetary=zh_CN.utf8 --lc-numeric=zh_CN.utf8 > --lc-time=zh_CN.utf8'. But the case problem is really confusing. Yes, it sounds very confusing. I wonder if pg_upgrade should do a case-insentive comprison of encodings? Comments? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +