Skip to content

Fix issue 3570 and increasing db connections for pg vector and pg record manager #4808

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lingsongzeng
Copy link

Description:

  1. uncomment and use pgvector so that key column from 'upsertion_records' table will match the id column from 'documents' table.
  2. However, above will result in increasing db connections. Release connections in proper places.

@@ -247,20 +203,28 @@ class Postgres_VectorStores implements INode {

try {
if (recordManager) {
const vectorStore = await vectorStoreDriver.instanciate()
const vectorStore: any = await vectorStoreDriver.instanciate()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this call creates new connection every time

maybe we could cache it by tableName?

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

Successfully merging this pull request may close these issues.

2 participants