mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 21:13:31 +02:00
improve pooler sync (#1593)
* remove role from installLookupFunction and run it on database sync, too * fix condition to decide on syncing pooler * trigger lookup from database sync only if pooler is set * use empty spec everywhere and do not sync if one lookupfunction was passed * do not sync pooler after being disabled
This commit is contained in:
@@ -758,6 +758,15 @@ func (c *Cluster) syncDatabases() error {
|
||||
}
|
||||
}
|
||||
|
||||
if len(createDatabases) > 0 {
|
||||
// trigger creation of pooler objects in new database in syncConnectionPooler
|
||||
if c.ConnectionPooler != nil {
|
||||
for _, role := range [2]PostgresRole{Master, Replica} {
|
||||
c.ConnectionPooler[role].LookupFunction = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set default privileges for prepared database
|
||||
for _, preparedDatabase := range preparedDatabases {
|
||||
if err := c.initDbConnWithName(preparedDatabase); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user