Re: Index AM API cleanup
Peter Eisentraut <peter@eisentraut.org>
Attachments
- v22-0001-TEST-Add-loadable-modules-as-tests-of-the-amapi.patch.gz (application/x-gzip) patch v22-0001
- v22-0002-TEST-Fixup-for-test-driver.patch (text/plain) patch v22-0002
- v22-0003-TEST-Add-treeb-deep-copy-of-btree.patch.gz (application/x-gzip) patch v22-0003
- v22-0004-TEST-treeb-fixups.patch (text/plain) patch v22-0004
- v22-0005-Generalize-index-support-in-network-support-func.patch (text/plain) patch v22-0005
- v22-0006-Convert-from-StrategyNumber-to-CompareType.patch (text/plain) patch v22-0006
- v22-0007-TEST-Rotate-treeb-strategy-numbers.patch (text/plain) patch v22-0007
- v22-0008-WIP-Support-row-compare-index-scans-with-non-btr.patch (text/plain) patch v22-0008
- v22-0009-WIP-Generalize-index-support-in-range-type-suppo.patch (text/plain) patch v22-0009
- v22-0010-WIP-Allow-more-index-AMs-in-ALTER-OP-FAMILY.ADD.patch (text/plain) patch v22-0010
Here is a new version of the remaining main patch set. I've made a lot of changes to reduce the size and scope. - In version v21, you had included a bunch of expected files in the "treeb" module, which wasn't necessary, since the test driver overwrote those anyway. I removed those, which makes the patch much smaller. - The patch set made various attempts to be able to use a non-btree operator family as the referenced operator family for ordering operators, but this was not fully developed, since you had just hardcoded BTREE_AM_OID in most places. I have cut all of this out, since this just blows up the patch surface but doesn't add any functionality at this time. I believe the patch for ALTER OPERATOR FAMILY / ADD falls into this category as well, so I have moved this to the end of the patch series, as "WIP". (I think this is ok because the purpose of this patch set is to allow new index types that behave like btree in many ways, whereas what the above feature would allow is to have a type that doesn't require a btree operator family to communicate its semantics. These things are morally related but technically distinct.) - For similar reasons, I removed the changes you made in typcache.c. With the new infrastructure we have in place, we might someday reconsider how the type cache works and make it more independent of hardcoded btree and hash behavior, but this is not necessary for this patch set. - Move the changes in rangetypes.c to a separate "WIP" patch. This patch is incomplete, as described in the patch, and also not needed for this patch series' goal. - There were also a couple of other minor "excessive" generalizations that I skipped. For example, we don't need to make the function btcostestimate() independent of btree strategies. - Conversely, I moved the changes in network.c to a separate patch at the front of the patch series, and fixed them up so that they actually work. The effect of this is easily visible in the "inet" test in the "xtree" test module. - I separated out the changes dealing with row compare support into a separate patch. I think this is not fully ready. You'll see the FIXME in src/backend/executor/nodeIndexscan.c. Also, this still had a test for BTREE_AM_OID in it, so it didn't really work anyway. I think leaving this out for now is not a huge loss. Index support for row compare is a specialized feature. - I squashed together the remaining feature patches into one patch. I observed that you had gradually adjusted the interfaces to use CompareType instead of strategy numbers, but then left it so that they would accept either one (for example, PathKey). But then I went through and removed the strategy number support for the most part, since nothing was using it anymore. (For example, PathKey was using strategy numbers for fake purposes anyway, so we don't need them there anymore, and it all trickles from there in a way.) The resulting patch is much smaller and much much simpler now, since it is mostly just a straight conversion from strategy to compare type and not much else. Here is the current lineup: v22-0001-TEST-Add-loadable-modules-as-tests-of-the-amapi.patch v22-0002-TEST-Fixup-for-test-driver.patch This is the test setup, as before. I added a small fix to reduce the diffs further. v22-0003-TEST-Add-treeb-deep-copy-of-btree.patch.gz v22-0004-TEST-treeb-fixups.patch As before, with a compilation fix to keep up with some other changes. v22-0005-Generalize-index-support-in-network-support-func.patch As explained above, I think this patch stands on its own and is ready to go. Check please. v22-0006-Convert-from-StrategyNumber-to-CompareType.patch This is all that remains now. I think with a bit more polishing around the edges, some comment updates, etc., this is close to ready. v22-0007-TEST-Rotate-treeb-strategy-numbers.patch This still works. ;-) v22-0008-WIP-Support-row-compare-index-scans-with-non-btr.patch v22-0009-WIP-Generalize-index-support-in-range-type-suppo.patch v22-0010-WIP-Allow-more-index-AMs-in-ALTER-OP-FAMILY.ADD.patch These are postponed, as described above.
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Relax ordering-related hardcoded btree requirements in planning
- a8025f544854 18.0 landed
-
Support non-btree indexes in get_actual_variable_range()
- 9ef1851685b7 18.0 landed
-
Convert PathKey to use CompareType
- 8123e91f5aeb 18.0 landed
-
Generalize index support in network support function
- be1cc9aaf5b7 18.0 landed
-
Update a code comment
- 190dc27998d5 18.0 landed
-
Allow non-btree unique indexes for matviews
- 9d6db8bec194 18.0 landed
-
Allow non-btree unique indexes for partition keys
- f278e1fe300a 18.0 landed
-
Add some opfamily support functions to lsyscache.c
- 7317e641268f 18.0 landed
-
Simplify and generalize PrepareSortSupportFromIndexRel()
- a359d3701991 18.0 landed
-
Generalize hash and ordering support in amapi
- ce62f2f2a0a4 18.0 landed
-
Drop opcintype from index AM strategy translation API
- 7d6d2c4bbd73 18.0 landed
-
Allow non-btree speculative insertion indexes
- b92c03342dcd 18.0 landed
-
Support non-btree indexes for foreign keys
- bfe21b760e03 18.0 landed
-
Integrate GistTranslateCompareType() into IndexAmTranslateCompareType()
- 622f678c1020 18.0 landed
-
Convert strategies to and from compare types
- c09e5a6a0165 18.0 landed
-
Move CompareType to separate header file
- 119fc30dd5bd 18.0 landed
-
Add get_opfamily_name() function
- 43493cceda2f 18.0 landed
-
Rename GistTranslateStratnum() to GistTranslateCompareType()
- a5709b5bb293 18.0 landed
-
Change gist stratnum function to use CompareType
- 630f9a43cece 18.0 landed
-
Rename RowCompareType to CompareType
- 6339f6468e82 18.0 landed
-
Improve slightly misleading internal error message
- 63e10988f870 18.0 landed
-
Track scan reversals in MergeJoin
- c594f1ad2ba7 18.0 landed
-
Track sort direction in SortGroupClause
- 0d2aa4d4937b 18.0 landed
-
Add stratnum GiST support function
- 7406ab623fee 18.0 cited
-
Add amgettreeheight index AM API routine
- 56fead44dcc7 18.0 landed