[HACKERS] GSoC 2017 Proposal for predicate locking in hash index - Mailing list pgsql-hackers

From Shubham Barai
Subject [HACKERS] GSoC 2017 Proposal for predicate locking in hash index
Date
Msg-id CALxAEPuj=71G22ohMLsWoHjhTKWnhsVdqg0X0tySr3sQXpXFNg@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] GSoC 2017 Proposal for predicate locking in hash index  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Hi, 

Now that hash index support write-ahead logging, it will be great if we add support for predicate locking to it. 
Implementation of predicate locking in hash index seems very simple.
I have already made changes in the code. I am currently working on testing.

Here is my approach 

1) PredicateLockPage()

->_hash_first()

During a scan operation, acquire a predicate lock on the primary page of a bucket.

2) CheckForSerializableConflictIn()

->_hash_doinsert()

During an insert operation, check if there is any predicate lock on the primary page of a bucket.


3) PredicateLockPageSplit()

In case of a bucket split, copy predicate lock from the primary page of an old bucket to the primary page of a new bucket.

Any suggestions or corrections will be appreciated.

Regards,
Shubham



Sent with Mailtrack

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Logical replication: stuck spinlock atReplicationSlotRelease
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Adding connection id in the startup message