Project: Explicitly support predicate locks in index AMs besides b-tree

Hi,

In the last two weeks, I mostly worked on predicate locking in rum index.
Rum is based on gin access method. The main difference between rum and
gin is that rum stores additional information in posting tree to perform
a fast full-text search using tsvector and tsquery.

Also, rum has different scanning strategies that include
scangetItemRegular (gets the next heap pointer from scan),
scangetItemfast (gets the next item pointer using fast scan),
scangetItemfull (gets the next item pointer using full index scan).

We have to insert a call for PredicateLockPage at all appropriate places
where a leaf page of entry tree or posting tree is scanned.
Unlike gin, rum doesn't support fast update, so we don't have to worry
about acquiring a relation level lock.

In summary, I have done following things in last two weeks.

1) read the source code of rum to understand its access method

2) found appropriate places to insert calls to existing functions

3) modified  some function prototypes to include snapshot parameter
 (rum was forked before snapshot feature was added to PostgreSQL, and
  snapshot parameter is needed for predicate locking)

4) created tests (to verify serialization failures and to demonstrate the
feature of reduced false positives)

5) debugged and fixed one issue in the previous patch for gin index.

6) created tests for predicate locking in B-tree.

link to the code for rum:
https://github.com/shubhambaraiss/rum/commit/e28e31d79fa6a0d1b6ef4bb7d7e5d0d334a069d9


Regards,
Shubham



<https://mailtrack.io/> Sent with Mailtrack
<https://mailtrack.io/install?source=signature&lang=en&referral=shubhambara...@gmail.com&idSignature=22>

Reply via email to