This commit is contained in:
Jan Mussler 2026-01-27 12:37:48 +01:00 committed by GitHub
commit b48cea8afc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -100,13 +100,17 @@ func (c *Cluster) pgConnectionString(dbname string) string {
if dbname == "" {
dbname = "postgres"
}
// TODO add global config option for this
var options = "-c log_statement=all"
return fmt.Sprintf("host='%s' dbname='%s' sslmode=require user='%s' password='%s' connect_timeout='%d'",
return fmt.Sprintf("host='%s' dbname='%s' sslmode=require user='%s' password='%s' connect_timeout='%d' options='%s'",
fmt.Sprintf("%s.%s.svc.%s", c.Name, c.Namespace, c.OpConfig.ClusterDomain),
dbname,
c.systemUsers[constants.SuperuserKeyName].Name,
strings.Replace(password, "$", "\\$", -1),
constants.PostgresConnectTimeout/time.Second)
constants.PostgresConnectTimeout/time.Second,
options)
}
func (c *Cluster) databaseAccessDisabled() bool {