db.SetMaxIdleConns(-1) will flush cached connections. That leaves the 
problem that open connections still in use will not get closed until 
returned to the pool, and only if caching idle connections is still 
disabled at that time.

Changing credentials on an already open *sql.DB isn't directly supported. 
It seems possible to implement with a wrapper of driver.Driver as Tamás 
Gulácsi suggested in another response. 

On Tuesday, November 1, 2016 at 8:36:22 AM UTC-4, Daniel Theophanes wrote:
>
> I think there is a larger issue at play of how old connections are cached 
> and handled. In particular there is no way to flush cached connections or 
> update credentials in the API.
>
> Could you file an issue with how to best update credentials on an existing 
> connection pool?
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to