fix sync of stream slots (#2194)
This commit is contained in:
		
							parent
							
								
									d5251c5fc8
								
							
						
					
					
						commit
						7a90fbcb00
					
				|  | @ -647,8 +647,13 @@ func (c *Cluster) checkAndSetGlobalPostgreSQLConfiguration(pod *v1.Pod, effectiv | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		slotsToSet[slotName] = desiredSlot | 		slotsToSet[slotName] = desiredSlot | ||||||
|  | 		// only add slots specified in manifest to c.replicationSlots
 | ||||||
|  | 		for manifestSlotName, _ := range c.Spec.Patroni.Slots { | ||||||
|  | 			if manifestSlotName == slotName { | ||||||
| 				c.replicationSlots[slotName] = desiredSlot | 				c.replicationSlots[slotName] = desiredSlot | ||||||
| 			} | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 	if len(slotsToSet) > 0 { | 	if len(slotsToSet) > 0 { | ||||||
| 		configToSet["slots"] = slotsToSet | 		configToSet["slots"] = slotsToSet | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue