registerConn adds a client connection to the registry for pg_stat_activity.
(c *clientConn)
| 743 | s.activeQueriesMu.Lock() |
| 744 | // Lazily initialized: production servers get the map from New, but test |
| 745 | // fixtures (and InitMinimalServer paths) may construct a bare Server. |
| 746 | if s.activeQueries == nil { |
| 747 | s.activeQueries = make(map[BackendKey]context.CancelFunc) |
| 748 | } |
| 749 | s.activeQueries[key] = cancel |
| 750 | s.activeQueriesMu.Unlock() |
| 751 | } |
| 752 |
no outgoing calls