deepset-ai / deepset-ai/haystack-core-integrations

Pattern for use of pgvector document store with multiple users querying

Open
#1,356 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

integration:pgvector P3
Dominant language
Python
Stars
203
Forks
332
Avg merge
2d 4h
Merged PRs (30d)
80

Description

Hi,

Is there a best practive on how to use a pgvector document store in a "server setting"? We have multiple users sending in requests to our (fastapi) backend, but reusing the same document store is a blocking operation.

We could instantiate a new document store with each request, but then we run into connection issues, because there is no check on how many connections are open at any one time (ie we need a connection pool for this).

What is best practice in this circumstance?

Best and thanks,
Adrian

Contributor guide

Open the contributing guide

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.

Research direction

The issue names no repository file, test, or entry point; start by locating the pgvector document-store integration and its FastAPI usage. Review how document-store instances and database connections are managed, then document a supported multi-user pattern with connection limits and a clear validation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, postgresql, python
Domain
api, backend, databases
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.