Minor Changes
-
#764
c92d1dfThanks @gajus! - Add'DISABLE_TIMEOUT'support foridleTimeoutandmaximumConnectionAge.Previously, passing
idleTimeout: 'DISABLE_TIMEOUT'was silently ignored — the sentinel string was accepted by the type but never propagated throughcreatePoolConfiguration, so the idle timer always fired at the default 10s. Similarly,maximumConnectionAgeonly accepted a plain number with no way to opt out of age-based connection recycling.Changes:
idleTimeout: 'DISABLE_TIMEOUT'now correctly disables idle connection cleanup. Connections aboveminimumPoolSizeare kept alive indefinitely until explicitly released or the pool is ended.maximumConnectionAgenow accepts'DISABLE_TIMEOUT'to disable age-based recycling. Connections are no longer destroyed and replaced after the default 30-minute lifetime.- Passing
0for either field now emits a warning and clamps to1ms(matching the existingidleTimeout=0behaviour), rather than being silently ignored. DriverConfiguration.maximumConnectionAgein@slonik/driveris widened to'DISABLE_TIMEOUT' | numberfor consistency with the other timeout fields.
Internally,
'DISABLE_TIMEOUT'is resolved toNumber.POSITIVE_INFINITYat thecreatePoolConfigurationboundary so thatcreateConnectionPoolworks with plain numeric comparisons throughout.
Patch Changes
- Updated dependencies [
c92d1df]:- @slonik/driver@48.13.0
- @slonik/errors@48.13.0
- @slonik/pg-driver@48.13.0
- @slonik/sql-tag@48.13.0
- @slonik/utilities@48.13.0