edge case is when desired is lower than effective

This commit is contained in:
Felix Kunde 2021-10-20 18:27:39 +02:00
parent bf0c06cca4
commit d3fe4264d4
1 changed files with 1 additions and 1 deletions

View File

@ -567,7 +567,7 @@ func (c *Cluster) checkAndSetGlobalPostgreSQLConfiguration(pod *v1.Pod, patroniC
effectiveValue := effectivePgParameters[desiredOption] effectiveValue := effectivePgParameters[desiredOption]
if isBootstrapOnlyParameter(desiredOption) && (effectiveValue != desiredValue) { if isBootstrapOnlyParameter(desiredOption) && (effectiveValue != desiredValue) {
parametersToSet[desiredOption] = desiredValue parametersToSet[desiredOption] = desiredValue
if util.SliceContains(requireMasterRestartWhenDecreased, desiredOption) && (effectiveValue != desiredValue) { if util.SliceContains(requireMasterRestartWhenDecreased, desiredOption) && (effectiveValue > desiredValue) {
restartMaster = append(restartMaster, true) restartMaster = append(restartMaster, true)
} else { } else {
restartMaster = append(restartMaster, false) restartMaster = append(restartMaster, false)