mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-21 01:22:41 +02:00
fix LookupFunction flag
This commit is contained in:
@@ -760,11 +760,11 @@ func (c *Cluster) syncConnectionPooler(oldSpec, newSpec *acidv1.Postgresql, Look
|
|||||||
// in between
|
// in between
|
||||||
|
|
||||||
// in this case also do not forget to install lookup function
|
// 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 {
|
if err = c.syncConnectionPoolerSchema(LookupFunction); err != nil {
|
||||||
c.ConnectionPooler[role].LookupFunction = true
|
|
||||||
return NoSync, err
|
return NoSync, err
|
||||||
}
|
}
|
||||||
|
c.ConnectionPooler[role].LookupFunction = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if reason, err = c.syncConnectionPoolerWorker(oldSpec, newSpec, role); err != nil {
|
if reason, err = c.syncConnectionPoolerWorker(oldSpec, newSpec, role); err != nil {
|
||||||
|
|||||||
+1
-1
@@ -760,7 +760,7 @@ func (c *Cluster) syncDatabases() error {
|
|||||||
|
|
||||||
if len(createDatabases) > 0 {
|
if len(createDatabases) > 0 {
|
||||||
// create the pooler objects in new database if needed
|
// create the pooler objects in new database if needed
|
||||||
if needConnectionPooler(&c.Spec) {
|
if c.ConnectionPooler != nil && needConnectionPooler(&c.Spec) {
|
||||||
c.syncConnectionPoolerSchema(c.installLookupFunction)
|
c.syncConnectionPoolerSchema(c.installLookupFunction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user