Rather than letting Bob create a pool-on-pool.
This commit is contained in:
parent
05fc763b2f
commit
2093ea74c4
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue