Skip to content

Use connection pool from common repo#427

Merged
staticlibs merged 1 commit intoduckdb:mainfrom
staticlibs:common_pool
Apr 3, 2026
Merged

Use connection pool from common repo#427
staticlibs merged 1 commit intoduckdb:mainfrom
staticlibs:common_pool

Conversation

@staticlibs
Copy link
Copy Markdown
Collaborator

This PR changes the connection pool implementation to use the one from the database-connector repository.

The user-facing functionality stays the same with the following changes:

  • default pool size is changed from 64 to max(num_cpus, 8)
  • pg_connection_cache setting now can be used to disable the pool, but not to re-enable it; pg_connection_limit setting should be set to positive number to enable back the pool that was disabled.
  • when the pool is enabled and all connection slots are already used, the request to get the connection from the pool will try to acquire the connection from the pool for 30 seconds before throwing an error.

More pool settings are planned to be exposed in subsequent PRs.

This PR changes the connection pool implementation to use the one from
the [database-connector](https://github.com/duckdb/database-connector)
repository.

The user-facing functionality stays the same with the following changes:

 - default pool size is changed from `64` to `max(num_cpus, 8)`
 - `pg_connection_cache` setting now can be used to disable the pool,
   but not to re-enable it; `pg_connection_limit` setting should be set
   to positive number to enable back the pool that was disabled.
 - when the pool is enabled and all connection slots are already used,
   the request to get the connection from the pool will try to acquire
   the connection from the pool for 30 seconds before throwing an error.

More pool settings are planned to be exposed in subsequent PRs.
@staticlibs staticlibs merged commit 2d340fd into duckdb:main Apr 3, 2026
16 of 17 checks passed
@staticlibs staticlibs deleted the common_pool branch April 4, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant