Re: ltree_gist indexes broken after pg_upgrade from 12 to 13

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: ltree_gist indexes broken after pg_upgrade from 12 to 13
Date: 2022-03-05 07:13:00
Message-ID: 1c6722b0-f2be-9689-46b3-579620d70d8d@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/4/22 23:09, Nikita Glukhov wrote:
> On 04.03.2022 23:28, Tom Lane wrote:
>
>> Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> writes:
>>> On 3/4/22 20:29, Nikita Glukhov wrote:
>>>> So, we probably have corrupted indexes that were updated since such
>>>> "incomplete" upgrade of ltree.
>>> IIRC pg_upgrade is not expected to upgrade extensions - it keeps the
>>> installed version of the extension, and that's intentional.
>> Yeah, exactly. But this opens up an additional consideration we
>> have to account for: whatever we do needs to work with either 1.1
>> or 1.2 SQL-level versions of the extension.
>>
>> regards, tom lane
>
> It becomes clear that ltree upgrade 1.1 => 1.2 is broken, the problem
> is not so much related to PG12 => PG13+ upgrades.
>

Well, it's quite a mess :-(

It very clearly is not just 1.1 -> 1.2 upgrade issue, because you can
get a crash with 1.1 after PG12 -> PG13 upgrade, as demonstrated
earlier. So just "fixing" the extension upgrade is no enough.

But as you showed, 1.1 -> 1.2 upgrade is broken too.

>
> You can see here another problem: installation of opclass options
> procedure does not invalidate relation's opclass options cache.
>

Seems like that.

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-03-05 08:38:30 Re: ICU for global collation
Previous Message Michael Paquier 2022-03-05 06:20:29 Re: [PoC] Let libpq reject unexpected authentication requests