mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 07:57:27 +02:00
Update database.go
This commit is contained in:
@@ -97,13 +97,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' options='-c log_statement%3Dall'",
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user