Alternative SAOP support for GiST

From: Michał Kłeczek <michal(at)kleczek(dot)org>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Alternative SAOP support for GiST
Date: 2024-03-11 17:58:54
Message-ID: 1D753E34-C0EA-4A81-9DFF-29204485A818@kleczek.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,

During my journey of designing Pg based solution at my work I was severely hit by several shortcomings in GiST.
The most severe one is the lack of support for SAOP filters as it makes it difficult to have partition pruning and index (only) scans working together.

To overcome the difficulties I implemented a simple extension:
https://github.com/mkleczek/btree_gist_extra
mkleczek/btree_gist_extra: Extra operators support for PostgreSQL btree_gist
github.com

Since it provides a separate operator class from btree_gist it requires re-indexing the data.
So I thought maybe it would be a good idea to incorporate it into btree_gist.

I am aware of two patches related to SAOP being discussed at the moment but I am not sure if SAOP support for GiST indexes is planned.

Let me know if you think it is a good idea to work on a patch.

More general remark:
I am wondering if SAOP support in core should not be implemented by mapping SAOP operations to specialised operators and delegating
all the work to index AMs. That way core could be decoupled from particular index AMs implementation details.

Thanks!


Michal

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2024-03-11 18:20:36 Re: Statistics Import and Export
Previous Message Melanie Plageman 2024-03-11 16:15:44 Re: Confine vacuum skip logic to lazy_scan_skip