--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/5d75008b-fcab-4422-b493-a57531a4daddn%40googlegroups.com.
Why do you think it doesn't wait for all connections to be closed and freed?
--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/12486fef-8b92-410a-85b3-978c969640can%40googlegroups.com.
On Nov 5, 2025, at 10:31 PM, 'Sean Liao' via golang-nuts <golan...@googlegroups.com> wrote:
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAGabyPpz5iGkyWAM_K434p24FthLK7vu6Q9oRaWFP%3DjqofPsrQ%40mail.gmail.com.
Isn’t the design supposed to be that the driver maintains the connections so when you close the db, it closes the driver connection, and that should wait until the current statements complete or terminate them. Terminating a live connection is going to be db specific.I think it is driver issue.
I agree then that the docs don't match the current behavior, open an issue.Less clear to me is whether the fix is to change the docs or change the behavior to match the current docs.But the current design certainly doesn't hold references to conns that have been handed out.
--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/d3585166-9eb9-4546-b1a8-be231afe89bcn%40googlegroups.com.
I reviewed the stdlib a bit more, and the driver connection is the “db connection” (upon which statements are run - these are handed out) and these are tracked:
--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/9653482e-8bea-4135-b092-cb449acbeda1n%40googlegroups.com.
I looked through the code some more, and I think these lines are where the connector should close/wait for outstanding connections to be finished.I would assume this is the connector’s responsibility as long as it implements io.Closer.I have’t run anything through we I could break point and see what’s going on.I look through the other structures and it certainly seems like closing and waiting (for statements on each connection to be done) is a responsibility.
--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/b09ff43a-0713-4b88-bbc4-374c63f1f828n%40googlegroups.com.