@@ -281,20 +281,20 @@ func NewWithConfig(ctx context.Context, config *Config) (*Pool, error) {
281
281
// ParseConfig builds a Config from connString. It parses connString with the same behavior as [pgx.ParseConfig] with the
282
282
// addition of the following variables:
283
283
//
284
- // - pool_max_conns: integer greater than 0
285
- // - pool_min_conns: integer 0 or greater
286
- // - pool_max_conn_lifetime: duration string
287
- // - pool_max_conn_idle_time: duration string
288
- // - pool_health_check_period: duration string
289
- // - pool_max_conn_lifetime_jitter: duration string
284
+ // - pool_max_conns: integer greater than 0 (default 4)
285
+ // - pool_min_conns: integer 0 or greater (default 0)
286
+ // - pool_max_conn_lifetime: duration string (default 1 hour)
287
+ // - pool_max_conn_idle_time: duration string (default 30 minutes)
288
+ // - pool_health_check_period: duration string (default 1 minute)
289
+ // - pool_max_conn_lifetime_jitter: duration string (default 0)
290
290
//
291
291
// See Config for definitions of these arguments.
292
292
//
293
293
// # Example Keyword/Value
294
- // user=jack password=secret host=pg.example.com port=5432 dbname=mydb sslmode=verify-ca pool_max_conns=10
294
+ // user=jack password=secret host=pg.example.com port=5432 dbname=mydb sslmode=verify-ca pool_max_conns=10 pool_max_conn_lifetime=1h30m
295
295
//
296
296
// # Example URL
297
- // postgres://jack:[email protected] :5432/mydb?sslmode=verify-ca&pool_max_conns=10
297
+ // postgres://jack:[email protected] :5432/mydb?sslmode=verify-ca&pool_max_conns=10&pool_max_conn_lifetime=1h30m
298
298
func ParseConfig (connString string ) (* Config , error ) {
299
299
connConfig , err := pgx .ParseConfig (connString )
300
300
if err != nil {
0 commit comments