Skip to content

Allow more customization of Pool behavior #6595

Description

@DavidSchuldenfrei

We need a specific pool behavior for Connections. Specifically we would like to have control over how many Idle connections are in the pool.
Our application sometimes has sudden spike in traffic, and handling them requires opening many connections in a small amount of time. This can take several seconds. If we could handle the pooling mechanism, we could preopen these connections.
Using MinConnection doesn't work because:

  1. MinConnection will not lazy populate the pool
  2. Min Connection will not replace connections which were removed from the pool when they became stale.

Having more of the methods from PoolingDataSource accessible (protected) would allow us this functionality (right now we have to use reflection).
Specifically we would need accessible:

  • Statistics property
  • OpenNewConnector method
  • NpgsqlTimeout type

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions