From 68fb6f682dc9469316094e25c73761c80e56ae89 Mon Sep 17 00:00:00 2001 From: ricky Date: Tue, 6 Jan 2026 09:28:49 +0800 Subject: [PATCH] fix: replace pg conn with pgpool --- vectorstores/pgvector/pgvector.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vectorstores/pgvector/pgvector.go b/vectorstores/pgvector/pgvector.go index 7c8becb54..00a1460ff 100644 --- a/vectorstores/pgvector/pgvector.go +++ b/vectorstores/pgvector/pgvector.go @@ -10,6 +10,7 @@ import ( "github.com/google/uuid" "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" + "github.com/jackc/pgx/v5/pgxpool" "github.com/pgvector/pgvector-go" "github.com/tmc/langchaingo/embeddings" "github.com/tmc/langchaingo/schema" @@ -80,7 +81,7 @@ func New(ctx context.Context, opts ...Option) (Store, error) { return Store{}, err } if store.conn == nil { - store.conn, err = pgx.Connect(ctx, store.connURL) + store.conn, err = pgxpool.New(ctx, store.connURL) if err != nil { return Store{}, err }