-
Notifications
You must be signed in to change notification settings - Fork 877
Milestone
Description
Especially in cloud providers, the password sometimes contains an auth token that must be regularly rotated. To work with this, users currently need to generate new connection strings with the new auth tokens embedded in them; this is cumbersome, causes needless pool fragmentation, and even leaks pools (see #3387, which should be fixable in 7.0, but would still requiring setting Min Pool Size to 0 to avoid leaking - not good).
- In the NpgsqlDataSource world, we can simply have a mutable Password property; users can have a timer and inject the new auth token as they want.
- We can even go further and add an API on NpgsqlDataSource which accepts an interval and a lambda, and manage the timer internally, for maximum ease-of-use.
Even without NpgsqlDataSource, we should consider removing the password from the pool dictionary key, so that we always get the same pool regardless of password. The password is in any case relevant only when a new connection needs to be opened.
Reactions are currently unavailable