Skip to content

Commit

Permalink
PMM-11341 Close to rows.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriCtvrtka committed Nov 1, 2023
1 parent 67ca78e commit 87947d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions agent/serviceinfobroker/service_info_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ func (sib *ServiceInfoBroker) getPostgreSQLInfo(ctx context.Context, dsn string,
var databaseList []string
databaseListQuery := "SELECT /* agent='serviceinfobroker' */ datname FROM pg_database WHERE datallowconn = true AND datistemplate = false AND has_database_privilege(current_user, datname, 'connect')" //nolint:lll
rows, err := db.QueryContext(ctx, databaseListQuery)
defer rows.Close() //nolint:errcheck
if err != nil {
res.Error = err.Error()
return &res
Expand Down

0 comments on commit 87947d7

Please sign in to comment.