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 {
370
370
// something fails, report warning
371
371
c .createConnectionPooler (c .installLookupFunction )
372
372
373
+ // remember slots to detect deletion from manifest
374
+ for slotName , desiredSlot := range c .Spec .Patroni .Slots {
375
+ c .replicationSlots [slotName ] = desiredSlot
376
+ }
377
+
373
378
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
+ }
374
384
if err = c .syncStreams (); err != nil {
375
385
c .logger .Errorf ("could not create streams: %v" , err )
376
386
}
377
387
}
378
388
379
- for slotName , desiredSlot := range c .Spec .Patroni .Slots {
380
- c .replicationSlots [slotName ] = desiredSlot
381
- }
382
-
383
389
return nil
384
390
}
385
391
You can’t perform that action at this time.
0 commit comments