github vapor/fluent-postgres-driver 2.11.0
2.11.0 - Enable use of idle connection pruning

latest release: 2.12.0
11 months ago

What's Changed

Enable use of idle connection pruning by @gwynne in #225

AsyncKit 1.21.0 added support for automatic pruning of idle database connections in the connection pool. This PR adds the necessary configuration parameters to the Postgres driver, enabling Fluent users to take advantage of this new functionality:

app.databases.use(.postgres(
    url: "postgres://user@pass:host/db",
    pruningInterval: .minutes(1),
    maxIdleTimeBeforePruning: .minutes(10)
), as: .psql)

The pruningInterval controls how often the pool will check for idle connections; specifying nil disables idle pruning entirely. The maxIdleTimeBeforePruning controls how long a connection must go unused before being pruned.

Reviewers

Thanks to the reviewers for their help:

This patch was released by @gwynne

Full Changelog: 2.10.1...2.11.0

Don't miss a new fluent-postgres-driver release

NewReleases is sending notifications on new releases.