do not sync pooler after being disabled

This commit is contained in:
Felix Kunde 2021-08-26 16:30:28 +02:00
parent 91c6f18bbb
commit e2d08351aa
1 changed files with 1 additions and 1 deletions

View File

@ -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")