fix(pgdb): align pool defaults with pgxpool
Change MaxConns default from 25 to 4 to match pgxpool defaults. This ensures consistent behavior between DATABASE_URI and config file modes, and removes the warning log when using URI mode. Defaults now reference: https://pkg.go.dev/github.com/jackc/pgx/v5/pgxpool#Config
This commit is contained in:
@@ -115,8 +115,8 @@ func TestDefaultPoolOptions(t *testing.T) {
|
||||
if opts.MinConns != 0 {
|
||||
t.Errorf("Expected MinConns=0, got %d", opts.MinConns)
|
||||
}
|
||||
if opts.MaxConns != 25 {
|
||||
t.Errorf("Expected MaxConns=25, got %d", opts.MaxConns)
|
||||
if opts.MaxConns != 4 {
|
||||
t.Errorf("Expected MaxConns=4 (pgxpool default), got %d", opts.MaxConns)
|
||||
}
|
||||
if opts.MaxConnLifetime != time.Hour {
|
||||
t.Errorf("Expected MaxConnLifetime=1h, got %v", opts.MaxConnLifetime)
|
||||
|
||||
Reference in New Issue
Block a user