diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 4a7e938c3..f444dd219 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -200,4 +200,4 @@ func (c *Controller) runPostgresqlInformer(stopCh <-chan struct{}, wg *sync.Wait defer wg.Done() c.postgresqlInformer.Run(stopCh) -} +} \ No newline at end of file diff --git a/pkg/controller/postgresql.go b/pkg/controller/postgresql.go index c832476f7..d5c0773b9 100644 --- a/pkg/controller/postgresql.go +++ b/pkg/controller/postgresql.go @@ -238,6 +238,7 @@ func (c *Controller) processClusterEventsQueue(idx int, stopCh <-chan struct{}, }() <-stopCh + c.clusterEventQueues[idx].Close() } func (c *Controller) queueClusterEvent(old, new *spec.Postgresql, eventType spec.EventType) {