Skip to content

Commit

Permalink
fix(postgresql): Remove temporary pool config (#2851)
Browse files Browse the repository at this point in the history
The connection pool config was there before I was closing the pool after
analysis. The short connection lifespan was causing connection churn.
  • Loading branch information
kyleconroy authored Oct 13, 2023
1 parent 9590282 commit b178c8c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/engine/postgresql/analyzer/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"strings"
"sync"
"time"

"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
Expand Down Expand Up @@ -213,9 +212,6 @@ func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrat
if err != nil {
return nil, err
}
conf.MaxConns = 2
conf.MinConns = 0
conf.MaxConnLifetime = time.Second * 1
pool, err := pgxpool.NewWithConfig(ctx, conf)
if err != nil {
return nil, err
Expand Down

0 comments on commit b178c8c

Please sign in to comment.