can system catalogs have GIN indexes?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: can system catalogs have GIN indexes?
Date: 2023-04-27 18:03:54
Message-ID: CA+TgmoYWyOWLDXi=-8qpD3h06GcyjJqPAv9279edfzag6jDH=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Today, I found myself wondering whether we could add a non-btree
index, and in particular a GIN index, to a system catalog if we so
desired. Currently, after initdb, we only create tables and btree
indexes, but I'm not sure if there is any good reason why we couldn't
do something else. One problem with a GIN index specifically is that
it doesn't implement amgettuple, so routines like systable_getnext()
and index_getnext() couldn't be used, and we'd have to code up a
bitmap scan. Currently, bitmap scans aren't used anywhere other than
the executor, but I don't know of any reason why it wouldn't be
practical to use them elsewhere.

I think I may pursue a different approach to the problem that led me
to think about this, at least for the moment. But I'm still curious
about the general question: if somebody showed up with a well-written
patch that added a GIN index to a system catalog, would that
potentially be acceptable, or DOA?

--
Robert Haas
EDB: http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-04-27 18:16:35 Re: Possible regression setting GUCs on \connect
Previous Message Jacob Champion 2023-04-27 17:35:20 Re: [PoC] Federated Authn/z with OAUTHBEARER