fix sync of stream slots (#2194)

This commit is contained in:
Felix Kunde 2023-01-27 18:03:37 +01:00 committed by GitHub
parent d5251c5fc8
commit 7a90fbcb00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -647,7 +647,12 @@ func (c *Cluster) checkAndSetGlobalPostgreSQLConfiguration(pod *v1.Pod, effectiv
}
}
slotsToSet[slotName] = desiredSlot
c.replicationSlots[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
}
}
}
if len(slotsToSet) > 0 {
configToSet["slots"] = slotsToSet