database/sql: close driver.Connector if it implements an io.Closer #41790
I propose adding a new
We would like to be able to manage the resources in
For in-memory storage go-sqlite3 driver docs currently advice manually setting
It get worse with Genji since both on-disk BoltDB and BadgerDB engines lock the database. That is, connector can’t open the database until the existing handle is closed. With
That said, we need to release the resources held by
The text was updated successfully, but these errors were encountered:
The bar to expand or update the existing database/sql (v1) is fairly high
However, the change is simple and won't interact with anything else. There is one other situation that this would help. If a driver for a database without inline connection cancelation has a background goroutine/connection dedicated to closing connections, this would provide a way to prevent that connection from leaking.
I would say tentatively accept.