Skip to content

Commit 37d67d3

Browse files
committed
Fix for --all-dbs flag.
1 parent 48e85b0 commit 37d67d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collector/collect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func collectFromDB(connstr string, c *collector, o CollectConfig) {
299299
}
300300

301301
func getDBNames(connstr string, o CollectConfig) (dbnames []string) {
302-
db := getConn(connstr, o)
302+
db := getConn(connstr + makeKV("dbname", "postgres"), o)
303303
defer db.Close()
304304

305305
timeout := time.Duration(o.TimeoutSec) * time.Second

0 commit comments

Comments
 (0)