-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a ConnectionPool #256
Comments
Absolutely agreed. |
I have a very simple connection pool implementation which is an actor with dependencies on NIO, PostgresNIO, and Logging. Having the application pass in the PostgresConnection.Configuration would further simplify it. Typical usage is to initialize the actor, and then Checkout() and Release() database connections as required in the application. Happy to donate it, but I would expect that better code exists elsewhere in the Vapor code base. |
I can also offer a connection pool for those interested: https://github.com/Outdooractive/PostgresConnectionPool |
For security purposes it would be great to support ephemeral database user credentials, generated by something like HashiCorp’s Vault. These credentials timeout and then need to be regenerated. When they change, the Connection Pool would need to automatically close or automatically handle getting the new credentials and updating the connection. |
Work can be followed in the ConnectionPool milestone. |
@majortom64 your request is tracked as #431. |
We've released a PostgresClient implementation behind an SPI flag in the We would love to learn, if this solves your use-cases. |
I just implemented the |
We should provide a ConnectionPool out of the box.
The text was updated successfully, but these errors were encountered: