diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go index c8666653ba..355b6aa300 100644 --- a/src/database/sql/sql.go +++ b/src/database/sql/sql.go @@ -738,7 +738,9 @@ func (db *DB) Ping() error { return db.PingContext(context.Background()) } -// Close closes the database, releasing any open resources. +// Close closes the database and prevents new queries from starting. +// Close then waits for all queries that have started processing on the server +// to finish. // // It is rare to Close a DB, as the DB handle is meant to be // long-lived and shared between many goroutines.