Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for Read-Only Endpoints in PG Vector Vector Store #98

Open
juliangrueber opened this issue Aug 6, 2024 · 0 comments

Comments

@juliangrueber
Copy link

Issue Description:

As of now, the vector store for PG Vector requires the usage of a read and write endpoint. However, there are situations where read-only functionality is sufficient. Introducing support for read-only endpoints in the vector store would provide the following benefits:

  1. Least Privilege Permissions:

    • Allowing the use of read-only endpoints enables the principle of least privilege for the database user needed for the vector store. Currently, all instances of the vector store require strong permissions because the vector store always checks the existence of the extension and more. A read-only instance would not need such elevated permissions, enhancing security.
  2. Improved Scalability and Reduced Latency:

    • PostgreSQL databases typically provide one read-write endpoint and multiple read-only endpoints. Enabling a read-only vector store would allow for more efficient resource usage by distributing the load across multiple read-only endpoints. This can help in scaling out and reducing latency for read operations.

Proposed Change:

Modify the vector store initialization to support read-only endpoints by allowing conditional creation and checking of the vector extension and collection.

Current Code Reference:

self.create_tables_if_not_exists()
self.create_collection()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant