| From: | Shubham Barai <shubhambaraiss(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Kevin Grittner <kgrittn(at)gmail(dot)com>, Andrew Borodin <amborodin86(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Subject: | GSoC 2017 Proposal for predicate locking in hash index |
| Date: | 2017-06-21 18:33:34 |
| Message-ID: | CALxAEPuj=71G22ohMLsWoHjhTKWnhsVdqg0X0tySr3sQXpXFNg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
<https://mailtrack.io/> Sent with Mailtrack
<https://mailtrack.io/install?source=signature&lang=en&referral=shubhambaraiss(at)gmail(dot)com&idSignature=22>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2017-06-21 19:07:10 | Re: Adding connection id in the startup message |
| Previous Message | Peter Eisentraut | 2017-06-21 18:32:24 | Re: Logical replication: stuck spinlock at ReplicationSlotRelease |