You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: manager_internal.go
    path of file: ./repos/encore/runtimes/go/storage/sqldb
    
    the code of the file until where you have to start completion: package sqldb

import (
	"context"
	"sync"

	"github.com/jackc/pgx/v5/pgxpool"

	"encore.dev/appruntime/exported/config"
	"encore.dev/appruntime/shared/reqtrack"
	"encore.dev/appruntime/shared/shutdown"
	"encore.dev/appruntime/shared/testsupport"
)

// Manager manages database connections.
type Manager struct {
	runtime *config.Runtime
	rt      *reqtrac
    
func (mgr *Manager) Shutdown(p *shutdown.Process) error {
	// Wait for all user code to finish before shutting down databases.
	<-p.ServicesShutdownCompleted.Done()
	<-p.OutstandingTasks.Done()

	var wg sync.WaitGroup
	mgr.mu.RLock()
	defer mgr.mu.RUnlock()

	wg.Add(len(mgr.dbs))
	for _, db := range mgr.dbs {
		db := db
		go func() {
			defer wg.Done()
			db.shutdown(p)
		}()
	}
	wg.Wait()
	return nil
}