fix(postgres): set dbname=postgres in admin mode (#5346)

This commit is contained in:
Silvan 2023-03-03 10:26:50 +01:00 committed by GitHub
parent 8b912645ac
commit c8142030e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,6 +145,8 @@ func (c Config) String(useAdmin bool) string {
} }
if !useAdmin { if !useAdmin {
fields = append(fields, "dbname="+c.Database) fields = append(fields, "dbname="+c.Database)
} else {
fields = append(fields, "dbname=postgres")
} }
if user.SSL.Mode != sslDisabledMode { if user.SSL.Mode != sslDisabledMode {
fields = append(fields, "sslrootcert="+user.SSL.RootCert) fields = append(fields, "sslrootcert="+user.SSL.RootCert)