Re: can system catalogs have GIN indexes?

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: can system catalogs have GIN indexes?
Date: 2023-04-27 18:21:39
Message-ID: CAH2-Wzkc+FOn5-J9_xjUwP_PDV_UhCGKpoyQhG3YtVJj2n+tWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 27, 2023 at 11:17 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> I'm asking this (at least in part) because it affects the answer. Lots
> of stuff that GIN does that seems like it would be particularly tricky
> to integrate with a system catalog is non-essential. It could be (and
> sometimes is) selectively disabled. Whereas B-Tree indexes don't
> really have any optional features (you can disable deduplication
> selectively, but I believe that approximately nobody ever found it
> useful to do so).

Actually, you *can't* disable deduplication against a system catalog
index in practice, due to a limitation with storage parameters. That's
why deduplication was disabled against system catalogs until Postgres
15.

That limitation would be much harder to ignore with GIN indexes.
B-Tree/nbtree deduplication is more or less optimized for being
enabled by default. It has most of the upside of posting lists, with
very few downsides. For example, you can sometimes get a lot more
space savings with Posting list compression (very low cardinality
indexes can be as much as 10x smaller), but that's not really
compatible with the design of nbtree deduplication.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2023-04-27 18:28:26 Re: Possible regression setting GUCs on \connect
Previous Message Peter Geoghegan 2023-04-27 18:17:17 Re: can system catalogs have GIN indexes?