You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.
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:
Least Privilege Permissions:
Improved Scalability and Reduced Latency:
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:
langchain-postgres/langchain_postgres/vectorstores.py
Lines 445 to 446 in 8883129
The text was updated successfully, but these errors were encountered: