[HACKERS] GSoC 2017 : Proposal for predicate locking in gist index

Поиск
Список
Период
Сортировка
От Shubham Barai
Тема [HACKERS] GSoC 2017 : Proposal for predicate locking in gist index
Дата
Msg-id CALxAEPto08BUB8o1ZCWHmF1_zG-Hx+uEhNxd7fuEaQ+=pvbk+g@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] GSoC 2017 : Proposal for predicate locking in gist index  (Kevin Grittner <kgrittn@gmail.com>)
Список pgsql-hackers

Hello everyone,

 

I have been accepted as GSoC student for the project "Explicitly support predicate locks in index access methods besides b-tree". I want to share my approach for implementation of page level predicate locking in gist index. Any suggestions will be appreciated.

 

Proposal

 

The main difference between b-tree and gist index while searching for a target tuple is that in gist index, we can determine if there is a match or not at any level of the index. In gist, index entry of internal nodes contains a predicate which is used as a search key to search all reachable tuples from that node. To insert a tuple in the index, we first check the key representing a target subtree. If it doesn't already cover the key we are inserting, we have to replace it with the union of old key and the key we are inserting. After considering all these points, it seems logical to acquire a predicate lock at each level of the index.

The simplest way to do that will be by inserting a call for prdicatelockpage() in gistscanpage().

Insertion algorithm also needs to check for conflicting predicate locks at each level of the index.

We can insert a call for CheckForSerializableConflictIn() at two places in gistdoinsert().

1. after acquiring an exclusive lock on internal page (in case we are trying to replace an old search key)

2. after acquiring an exclusive lock on leaf page

If there is not enough space for insertion, we have to copy predicate lock from an old page to all new pages generated after a successful split operation. For that, we can insert a call for PredicateLockPageSplit() in gistplacetopage().

 

Regards,

Shubham


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Channel binding support for SCRAM-SHA-256
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [HACKERS] TAP backpatching policy