Re: [HACKERS] bumping HASH_VERSION to 3 - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS] bumping HASH_VERSION to 3
Date
Msg-id CAA4eK1Jidtagm7Q81q-WoegOVgkotv0OxvHOjFxcvFRP4X=mSw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] bumping HASH_VERSION to 3  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [HACKERS] bumping HASH_VERSION to 3  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Tue, Apr 11, 2017 at 11:53 PM, Bruce Momjian <bruce@momjian.us> wrote:
> On Fri, Mar 31, 2017 at 02:48:05PM -0400, Tom Lane wrote:
>> +1, as long as we're clear on what will happen when pg_upgrade'ing
>> an installation containing hash indexes.  I think a minimum requirement is
>> that it succeed and be able to start up, and allow the user to manually
>> REINDEX such indexes afterwards.  Bonus points for:
>>
>> 1. teaching pg_upgrade to create a script containing the required REINDEX
>> commands.  (I think it's produced scripts for similar requirements in the
>> past.)
>>
>> 2. marking the index invalid so that the system would silently ignore it
>> until it's been reindexed.  I think there might be adequate infrastructure
>> for that already thanks to REINDEX CONCURRENTLY, and it'd just be a matter
>> of getting pg_upgrade to hack the indexes' catalog state.  (If not, it's
>> probably not worth the trouble.)
>
> We already have code to do all of that, but it was removed from
> pg_upgrade in 9.5.  You can still see it in 9.4:
>
>         contrib/pg_upgrade/version_old_8_3.c::old_8_3_invalidate_hash_gin_indexes()
>

Thanks for the pointer.

> I would be happy to restore that code and make it work for PG 10.
>

Attached patch implements the two points suggested by Tom. I will add
this to PG-10 open issues list so that we don't forget about this
work, let me know if you think otherwise.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Fwd: Re: [HACKERS] MSVC odd TAP test problem
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Remove pre-10 compatibility code in hash index