How does similarity filter interact with fine-grain SIREAD locks?

Open
#458 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
postgresql, rust
Domain
databases

Research direction

No files, tests, or entry points are named. Start by establishing the PostgreSQL SERIALIZABLE and SIREAD-lock behavior for the similarity query described, then inspect the relevant vector-search locking path; done means a confirmed explanation of the current behavior and a resolved decision on whether fine-grained locking belongs on the roadmap.

Written by the indexing model from the issue text.

Description

Hello,

Thanks again for this wonderful product and the hard work you've put into it.

Do similarity filters restrict the range of records for SIREAD locks? i.e. when in a SERIALIZABLE transaction and issuing a query with a similarity filter condition (e.g. SELECT FROM vectors WHERE centroid <<#>> sphere($1::halfvec, $2)), can pgsql restrict the concurrency checks to the range of rows that fell within the $2 search radius for fine-grained locking or is the entire table marked for SIREAD locks? Do any inserts into vectors during this transaction cause the serializable query to fail or only those that fell into the search radius?

I'm guessing fine-grained locking isn't implemented, but it would be amazing if it were! Is this on the roadmap?

Dominant language
Rust
Stars
1.8k
Forks
72
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supervc-stack/VectorChord

All issues in supervc-stack/VectorChord

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.