Re: Remove IndexInfo.ii_OpclassOptions field

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove IndexInfo.ii_OpclassOptions field
Date: 2023-08-25 01:31:09
Message-ID: ZOgEXTOa7Je/O9A6@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 24, 2023 at 08:57:58AM +0200, Peter Eisentraut wrote:
> During some refactoring I noticed that the field IndexInfo.ii_OpclassOptions
> is kind of useless. The IndexInfo struct is notionally an executor support
> node, but this field is not used in the executor or by the index AM code.
> It is really just used in DDL code in index.c and indexcmds.c to pass
> information around locally. For that, it would be clearer to just use local
> variables, like for other similar cases. With that change, we can also
> remove RelationGetIndexRawAttOptions(), which only had one caller left, for
> which it was overkill.

I am not so sure. There is a very recent thread where it has been
pointed out that we have zero support for relcache invalidation with
index options, causing various problems:
https://www.postgresql.org/message-id/CAGem3qAM7M7B3DdccpgepRxuoKPd2Y74qJ5NSNRjLiN21dPhgg%40mail.gmail.com

Perhaps we'd better settle on the other one before deciding if the
change you are proposing here is adapted or not.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-08-25 01:43:17 Re: PG 16 draft release notes ready
Previous Message Michael Paquier 2023-08-25 01:25:32 Re: Fix error handling in be_tls_open_server()