From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Alex Wang <alex(dot)wang(at)enterprisedb(dot)com>, Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com> |
Subject: | Re: Index AM API cleanup |
Date: | 2025-01-25 07:18:53 |
Message-ID: | 61045f6b-9cb2-4433-8477-5b22145dba6c@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I've been working on integrating Mark's "Index AM API cleanup" patch set
with the existing gist strategy number mapping from Paul's application
time patch set. Here is what I've come up with.
The previously committed patch (v19.1) already changed the gist strategy
number mapping to use the (Row)CompareType, as in Mark's proposal.
In this patch set, I'm attaching the existing standalone gist translate
function as the index AM API function for the gist index AM. And then
all existing callers are changed to call through the index AM API
functions provided by Mark's patch set.
Patches 0001, 0002, 0003 are some preparatory renaming and refactoring
patches.
Patches 0004 and 0005 are patch v19-0008 from Mark's (via Andrew) v19
patch set, split into two patches, and with some function renaming from
my side.
Patch 0006 then pulls it all together. The key change is that we also
need to pass the opclass to the index AM API functions, so that access
methods like gist can use it. Actually, I changed that to pass opfamily
and opcintype instead. I think this matches better with the rest of the
"Index AM API cleanup" patch set, because it's more common to have the
opfamily and type handy than the opclass. (And internally, the gist
support function is attached to the opfamily anyway, so it's actually
simpler that way.)
I think this fits together quite well now. Several places where gist
was hardcoded are now fully (or mostly) independent of gist. Also, the
somewhat hackish get_equal_strategy_number() in the logical replication
code disappears completely and is replaced by a proper index AM API
function. (This also takes care of patch v19-0011 from Mark's patch set.)
Also, since we have already built out test coverage for the
GistTranslate* stuff, the new index-AM-level translate functionality
gets to use this test coverage for free.
Thoughts?
[0]:
https://www.postgresql.org/message-id/ad628976-8b33-468d-8e52-3fbfcff89103%40dunslane.net
Attachment | Content-Type | Size |
---|---|---|
v19.2-0001-Rename-GistTranslateStratnum-to-GistTranslateC.patch | text/plain | 3.9 KB |
v19.2-0002-Add-get_opfamily_name-function.patch | text/plain | 2.1 KB |
v19.2-0003-Add-some-uses-of-get_opfamily_name.patch | text/plain | 13.7 KB |
v19.2-0004-Move-CompareType-to-separate-header-file.patch | text/plain | 5.8 KB |
v19.2-0005-Convert-strategies-to-and-from-compare-types.patch | text/plain | 13.5 KB |
v19.2-0006-Integrate-GistTranslateCompareType-into-IndexA.patch | text/plain | 11.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Jones | 2025-01-25 08:10:43 | Re: XMLDocument (SQL/XML X030) |
Previous Message | Pavel Stehule | 2025-01-25 07:16:34 | Re: XMLDocument (SQL/XML X030) |