From c8142030e90c3d949957b2bdc65adfe769152b73 Mon Sep 17 00:00:00 2001 From: Silvan Date: Fri, 3 Mar 2023 10:26:50 +0100 Subject: [PATCH] fix(postgres): set dbname=postgres in admin mode (#5346) --- internal/database/postgres/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/database/postgres/config.go b/internal/database/postgres/config.go index a276015619..37ae32cd56 100644 --- a/internal/database/postgres/config.go +++ b/internal/database/postgres/config.go @@ -145,6 +145,8 @@ func (c Config) String(useAdmin bool) string { } if !useAdmin { fields = append(fields, "dbname="+c.Database) + } else { + fields = append(fields, "dbname=postgres") } if user.SSL.Mode != sslDisabledMode { fields = append(fields, "sslrootcert="+user.SSL.RootCert)