-
Notifications
You must be signed in to change notification settings - Fork 408
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
Add support for rotating connection details #291
Comments
Possibly the simplest solution would be to factor out connection spec into a |
elprans
added a commit
that referenced
this issue
Jun 4, 2018
The new `Pool.cycle()` method expires all currently open connections, so they would be replaced with fresh ones on the next `acquire()` attempt. The new `Pool.set_connect_args()` allows changing the connection arguments for an existing pool instance. Coupled with `cycle()`, it allows adapting the pool to the new environment conditions without having to replace the pool instance. Fixes: #291
elprans
added a commit
that referenced
this issue
Jun 4, 2018
The new `Pool.cycle()` method expires all currently open connections, so they would be replaced with fresh ones on the next `acquire()` attempt. The new `Pool.set_connect_args()` allows changing the connection arguments for an existing pool instance. Coupled with `cycle()`, it allows adapting the pool to the new environment conditions without having to replace the pool instance. Fixes: #291
elprans
added a commit
that referenced
this issue
Jun 4, 2018
The new `Pool.cycle()` method expires all currently open connections, so they would be replaced with fresh ones on the next `acquire()` attempt. The new `Pool.set_connect_args()` allows changing the connection arguments for an existing pool instance. Coupled with `cycle()`, it allows adapting the pool to the new environment conditions without having to replace the pool instance. Fixes: #291
elprans
added a commit
that referenced
this issue
Jun 5, 2018
The new `Pool.expire_connections()` method expires all currently open connections, so they would be replaced with fresh ones on the next `acquire()` attempt. The new `Pool.set_connect_args()` allows changing the connection arguments for an existing pool instance. Coupled with `expire_connections()`, it allows adapting the pool to the new environment conditions without having to replace the pool instance. Fixes: #291
elprans
added a commit
that referenced
this issue
Jun 5, 2018
The new `Pool.expire_connections()` method expires all currently open connections, so they would be replaced with fresh ones on the next `acquire()` attempt. The new `Pool.set_connect_args()` allows changing the connection arguments for an existing pool instance. Coupled with `expire_connections()`, it allows adapting the pool to the new environment conditions without having to replace the pool instance. Fixes: #291
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be nice if the Pool supported rotating connection details. Our use-case would be using the hashicorp vault database secrets engine to generate postgres credentials on-the-fly. These credentials inherently have a limited life-span so when they expire we'd need to rotate them. As a work-around we were going to swap out the pool with a new pool but #290 prevents that.
One possible way to implement it, would be:
acquire()
would return connections with the new connection details setI could see this also being useful for fail-overs but thats not our use-case so idk
The text was updated successfully, but these errors were encountered: