Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DCDBCB5DC0C for ; Wed, 7 Sep 2011 05:07:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 79788-06 for ; Wed, 7 Sep 2011 08:07:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from depesz.com (andy.depesz.com [88.198.47.100]) by mail.postgresql.org (Postfix) with ESMTP id C2CD1B5DC06 for ; Wed, 7 Sep 2011 05:07:50 -0300 (ADT) Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.76) (envelope-from ) id 1R1DAb-0002mR-JK; Wed, 07 Sep 2011 10:07:41 +0200 Date: Wed, 7 Sep 2011 10:07:41 +0200 From: hubert depesz lubaczewski To: Bruce Momjian Cc: Tom Lane , PostgreSQL-development Subject: Re: [GENERAL] pg_upgrade problem Message-ID: <20110907080741.GA9936@depesz.com> Reply-To: depesz@depesz.com References: <20829.1315341395@sss.pgh.pa.us> <201109070121.p871L2h24928@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201109070121.p871L2h24928@momjian.us> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/331 X-Sequence-Number: 194520 On Tue, Sep 06, 2011 at 09:21:02PM -0400, Bruce Momjian wrote: > Tom Lane wrote: > > hubert depesz lubaczewski writes: > > > Worked a bit to get the ltree problem down to smallest possible, repeatable, situation. > > > > I looked at this again and verified that indeed, commit > > 8eee65c996048848c20f6637c1d12b319a4ce244 introduced an incompatible > > change into the on-disk format of ltree columns: it widened > > ltree_level.len, which is one component of an ltree on disk. > > So the crash is hardly surprising. I think that the only thing > > pg_upgrade could do about it is refuse to upgrade when ltree columns > > are present in an 8.3 database. I'm not sure though how you'd identify > > contrib/ltree versus some random user-defined type named ltree. > > It is actually easy to do using the attached patch. I check for the > functions that support the data type and check of they are from an > 'ltree' shared object. I don't check actual user table type names in > this case. While it will prevent failures in future, it doesn't solve my problem now :( Will try to do it via: - drop indexes on ltree - convert ltree to text - upgrade - convert text to ltree - create indexes on ltree Best regards, depesz