diff --git a/pkg/cluster/connection_pooler.go b/pkg/cluster/connection_pooler.go index 8ab0a1479..5bde71458 100644 --- a/pkg/cluster/connection_pooler.go +++ b/pkg/cluster/connection_pooler.go @@ -710,7 +710,7 @@ func (c *Cluster) syncConnectionPooler(oldSpec, newSpec *acidv1.Postgresql, Look // as per spec, hence do not skip syncing in that case, even though there // is no diff in specs if (!needSync && len(masterChanges) <= 0 && len(replicaChanges) <= 0) && - ((c.ConnectionPooler == nil && !needConnectionPooler(&newSpec.Spec)) || + ((!needConnectionPooler(&newSpec.Spec) && (c.ConnectionPooler == nil || !needConnectionPooler(&oldSpec.Spec))) || (c.ConnectionPooler != nil && needConnectionPooler(&newSpec.Spec) && (c.ConnectionPooler[Master].LookupFunction || c.ConnectionPooler[Replica].LookupFunction))) { c.logger.Debugln("syncing pooler is not required")