From 2093ea74c462ed4ae08be804d7b681026ade7174 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 19 May 2026 00:02:13 +0000 Subject: [PATCH] Pass pool management on to pgxpool Rather than letting Bob create a pool-on-pool. --- db/connection.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/connection.go b/db/connection.go index 2f7294fa..1018f8f0 100644 --- a/db/connection.go +++ b/db/connection.go @@ -222,6 +222,10 @@ func InitializeDatabase(ctx context.Context, uri string) error { return fmt.Errorf("new pool: %w", err) } bobDB := bob.NewDB(stdlib.OpenDBFromPool(db)) + sqlDB := bobDB.DB + sqlDB.SetMaxIdleConns(0) // let pgxpool manage idle + sqlDB.SetMaxOpenConns(0) // let pgxpool manage max + sqlDB.SetConnMaxLifetime(0) // let pgxpool manage lifetime PGInstance = &pginstance{bobDB, db} var current string