Add pg pool tuning options from kit v0.10.0

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-05-12 09:39:39 +02:00
parent 51a8380475
commit d88ae3288b
6 changed files with 69 additions and 28 deletions

View File

@@ -91,14 +91,16 @@ func New() *Implm {
Addr: "localhost:8080",
},
Pg: PgConfig{
Addr: "localhost:5432",
Username: "probod",
Password: "probod",
Database: "probod",
PoolSize: 100,
MinPoolSize: 10,
MaxConnIdleTimeSeconds: 1800,
MaxConnLifetimeSeconds: 3600,
Addr: "localhost:5432",
Username: "probod",
Password: "probod",
Database: "probod",
PoolSize: 100,
MinPoolSize: 10,
MaxConnIdleTimeSeconds: 1800,
MaxConnLifetimeSeconds: 3600,
MaxConnLifetimeJitterSeconds: 300,
HealthCheckPeriodSeconds: 60,
},
ChromeDPAddr: "localhost:9222",
Auth: AuthConfig{
@@ -209,6 +211,7 @@ func (impl *Implm) Run(
pgClient, err := pg.NewClient(
impl.cfg.Pg.Options(
pg.WithApplicationName("probod"),
pg.WithLogger(l),
pg.WithRegisterer(r),
pg.WithTracerProvider(tp),