fix LookupFunction flag
This commit is contained in:
parent
54481d76af
commit
8a3b414cec
|
|
@ -760,11 +760,11 @@ func (c *Cluster) syncConnectionPooler(oldSpec, newSpec *acidv1.Postgresql, Look
|
|||
// in between
|
||||
|
||||
// in this case also do not forget to install lookup function
|
||||
if c.ConnectionPooler[role].LookupFunction {
|
||||
if !c.ConnectionPooler[role].LookupFunction {
|
||||
if err = c.syncConnectionPoolerSchema(LookupFunction); err != nil {
|
||||
c.ConnectionPooler[role].LookupFunction = true
|
||||
return NoSync, err
|
||||
}
|
||||
c.ConnectionPooler[role].LookupFunction = true
|
||||
}
|
||||
|
||||
if reason, err = c.syncConnectionPoolerWorker(oldSpec, newSpec, role); err != nil {
|
||||
|
|
|
|||
|
|
@ -760,7 +760,7 @@ func (c *Cluster) syncDatabases() error {
|
|||
|
||||
if len(createDatabases) > 0 {
|
||||
// create the pooler objects in new database if needed
|
||||
if needConnectionPooler(&c.Spec) {
|
||||
if c.ConnectionPooler != nil && needConnectionPooler(&c.Spec) {
|
||||
c.syncConnectionPoolerSchema(c.installLookupFunction)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue