File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -370,16 +370,22 @@ func (c *Cluster) Create() error {
370370 // something fails, report warning
371371 c .createConnectionPooler (c .installLookupFunction )
372372
373+ // remember slots to detect deletion from manifest
374+ for slotName , desiredSlot := range c .Spec .Patroni .Slots {
375+ c .replicationSlots [slotName ] = desiredSlot
376+ }
377+
373378 if len (c .Spec .Streams ) > 0 {
379+ // creating streams requires syncing the statefulset first
380+ err = c .syncStatefulSet ()
381+ if err != nil {
382+ return fmt .Errorf ("could not sync statefulset: %v" , err )
383+ }
374384 if err = c .syncStreams (); err != nil {
375385 c .logger .Errorf ("could not create streams: %v" , err )
376386 }
377387 }
378388
379- for slotName , desiredSlot := range c .Spec .Patroni .Slots {
380- c .replicationSlots [slotName ] = desiredSlot
381- }
382-
383389 return nil
384390}
385391
You can’t perform that action at this time.
0 commit comments