Feature: add user-defined index access method #315
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The purpose of the commit is in support of user-defined index access method. Currently, there are many restrictions for index access methods and new index access methods are incompatible with internal framework. At the same time, it's impossible for user to change default index access method. So I build some hooks that are for changing default behavior and being compatible for those strange restrictions.
For express the meaning of the modification, I show a example as below.
For example , I want to add 7 kinds of new index access method that based on diffrent storage engine (maybe unionstore storage) and they are correspond to internal index access methods as below:
The main diffrence between them is index data can separate from other data and support Compute and Storage Separation.
Suppose we want to use these new functions, we can create a new extension and we can run sql (for example by
create extension unionstore;
) command and you can find new access methods :So you can use these new index access methods as internal index access method. At the same time, I add new guc variable and you can correct default index type by
set default_index_type = usbtree
or show relevant info byshow default_index_type
;In conclusion, it's more flexible and it decoupe from other part.