trigger lookup only if pooler is set

This commit is contained in:
Felix Kunde 2021-08-26 12:19:48 +02:00
parent f32e186d66
commit 8dc28295e4
1 changed files with 4 additions and 2 deletions

View File

@ -760,8 +760,10 @@ func (c *Cluster) syncDatabases() error {
if len(createDatabases) > 0 {
// trigger creation of pooler objects in new database in syncConnectionPooler
for _, role := range [2]PostgresRole{Master, Replica} {
c.ConnectionPooler[role].LookupFunction = false
if c.ConnectionPooler != nil {
for _, role := range [2]PostgresRole{Master, Replica} {
c.ConnectionPooler[role].LookupFunction = false
}
}
}