diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index dca1f2eee..35628badb 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -981,7 +981,7 @@ func (c *Cluster) Update(oldSpec, newSpec *acidv1.Postgresql) error { }() // add or remove standby_cluster section from Patroni config depending on changes in standby section - if reflect.DeepEqual(oldSpec.Spec.StandbyCluster, newSpec.Spec.StandbyCluster) { + if !reflect.DeepEqual(oldSpec.Spec.StandbyCluster, newSpec.Spec.StandbyCluster) { if err := c.syncStandbyClusterConfiguration(); err != nil { return fmt.Errorf("could not set StandbyCluster configuration options: %v", err) } diff --git a/pkg/cluster/sync.go b/pkg/cluster/sync.go index d5f9485c8..e044ac1c1 100644 --- a/pkg/cluster/sync.go +++ b/pkg/cluster/sync.go @@ -85,7 +85,7 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error { } // add or remove standby_cluster section from Patroni config depending on changes in standby section - if reflect.DeepEqual(oldSpec.Spec.StandbyCluster, newSpec.Spec.StandbyCluster) { + if !reflect.DeepEqual(oldSpec.Spec.StandbyCluster, newSpec.Spec.StandbyCluster) { if err := c.syncStandbyClusterConfiguration(); err != nil { return fmt.Errorf("could not sync StandbyCluster configuration: %v", err) }