mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-03 09:18:21 +02:00
do not remove publications of slot defined in manifest (#2868)
* do not remove publications of slot defined in manifest * improve condition to sync streams * init publication tables map when adding manifest slots * need to update c.Stream when there is no update
This commit is contained in:
+4
-1
@@ -153,7 +153,10 @@ func (c *Cluster) Sync(newSpec *acidv1.Postgresql) error {
|
||||
return fmt.Errorf("could not sync connection pooler: %v", err)
|
||||
}
|
||||
|
||||
if len(c.Spec.Streams) > 0 {
|
||||
// sync if manifest stream count is different from stream CR count
|
||||
// it can be that they are always different due to grouping of manifest streams
|
||||
// but we would catch missed removals on update
|
||||
if len(c.Spec.Streams) != len(c.Streams) {
|
||||
c.logger.Debug("syncing streams")
|
||||
if err = c.syncStreams(); err != nil {
|
||||
err = fmt.Errorf("could not sync streams: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user