From: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
---|---|
To: | Shubham Barai <shubhambaraiss(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, pgsql-students(at)postgresql(dot)org |
Subject: | Re: [pgsql-students] GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree" |
Date: | 2017-03-30 15:47:00 |
Message-ID: | CACjxUsPDZdKU1EqXe7TZeJONzhp=jVjtSSO8Uor5u_Sr7r3Nsw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-students |
On Tue, Mar 28, 2017 at 12:36 PM, Shubham Barai
<shubhambaraiss(at)gmail(dot)com> wrote:
> My name is Shubham Barai and I am a final year student at Maharashtra
> Institute of Technology, Pune, India. I am very interested in contributing
> Postgresql this year through GSoC project.
Welcome! Sorry I didn't spot this post earlier -- I'm behind on
reading the community lists and this didn't trigger any of the phrases
that pop things out to my attention right away.
> I am particularly interested in working on the project "Explicitly support
> predicate locks in index access methods besides btree". I have gone through
> some research papers which were recommended on
> https://wiki.postgresql.org/wiki/GSoC_2017 to understand the concept of
> Serializable Snapshot Isolation used in PostgreSQL. I have also browsed
> through the codebase to get some idea of different access methods for gin,
> gist, and hash indexes. I want to discuss my proposal to get some feedback
> before I write my final proposal. Sorry, I am discussing my proposal little
> late. I was really busy in my academics.
Understandable, but please be careful to get your final proposal in by
the deadline. Deadlines in GSoC are not flexible.
> Currently, only B+-trees support page level predicate locking.For other
> indexes, it acquires relation level lock which can lead to unnecessary
> serialization failure due to rw dependency caused by any insert into the
> index. So, the main task of this project is to support page level predicate
> locking for remaining indexes.
Right.
> [calls out several places that specific calls to predicate locking functions are needed]
> There may be a lot of other places where we need to insert function calls
> for predicate locking that I haven't included yet. I didn't go into details
> of every index AM.
That will be about half the work of the project. It is fine to
identify examples for your proposal, to show that you know what to
look for, but tracking down every last location can be completed after
the proposal is accepted. The other half of the work will be testing
and responding to issues others might raise.
> can anyone help me find existing tests for b-tree?
I think this should be it:
kgrittn(at)kevin-desktop:~/pg/master$ find src/backend/access/nbtree
-type f -name '*.c' | grep -v '/tmp_check/' | grep -v '/Debug/' |
xargs egrep -n 'PredicateLock|SerializableConflict'
src/backend/access/nbtree/nbtinsert.c:201:
CheckForSerializableConflictIn(rel, NULL, buf);
src/backend/access/nbtree/nbtinsert.c:402:
CheckForSerializableConflictIn(rel, NULL, buf);
src/backend/access/nbtree/nbtinsert.c:784:
PredicateLockPageSplit(rel,
src/backend/access/nbtree/nbtsearch.c:1040:
PredicateLockRelation(rel, scan->xs_snapshot);
src/backend/access/nbtree/nbtsearch.c:1052:
PredicateLockPage(rel, BufferGetBlockNumber(buf),
src/backend/access/nbtree/nbtsearch.c:1483:
PredicateLockPage(rel, blkno, scan->xs_snapshot);
src/backend/access/nbtree/nbtsearch.c:1578:
PredicateLockPage(rel, BufferGetBlockNumber(so->currPos.buf),
scan->xs_snapshot);
src/backend/access/nbtree/nbtsearch.c:1869:
PredicateLockRelation(rel, scan->xs_snapshot);
src/backend/access/nbtree/nbtsearch.c:1874: PredicateLockPage(rel,
BufferGetBlockNumber(buf), scan->xs_snapshot);
src/backend/access/nbtree/nbtpage.c:1410:
PredicateLockPageCombine(rel, leafblkno, leafrightsib);
--
Kevin Grittner
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-03-30 15:49:21 | Re: [POC] A better way to expand hash indexes. |
Previous Message | Tom Lane | 2017-03-30 15:45:51 | Re: \if, \elseif, \else, \endif (was Re: PSQL commands: \quit_if, \quit_unless) |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2017-03-30 15:55:23 | Re: GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree" |
Previous Message | Shubham Barai | 2017-03-28 17:36:45 | GSoC 2017 Proposal for "Explicitly support predicate locks in index access methods besides btree" |