mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-22 02:49:32 +02:00
Address code review by @zerg-junior
This commit is contained in:
@@ -225,10 +225,10 @@ PatroniInitDBParams:
|
|||||||
localParameters := make(map[string]string)
|
localParameters := make(map[string]string)
|
||||||
bootstrapParameters := make(map[string]string)
|
bootstrapParameters := make(map[string]string)
|
||||||
for param, val := range pg.Parameters {
|
for param, val := range pg.Parameters {
|
||||||
if !isBootstrapOnlyParameter(param) {
|
if isBootstrapOnlyParameter(param) {
|
||||||
localParameters[param] = val
|
|
||||||
} else {
|
|
||||||
bootstrapParameters[param] = val
|
bootstrapParameters[param] = val
|
||||||
|
} else {
|
||||||
|
localParameters[param] = val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(localParameters) > 0 {
|
if len(localParameters) > 0 {
|
||||||
@@ -296,6 +296,9 @@ func (c *Cluster) tolerations(tolerationsSpec *[]v1.Toleration) []v1.Toleration
|
|||||||
return []v1.Toleration{}
|
return []v1.Toleration{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// isBootstrapOnlyParameter checks asgainst special Patroni bootstrap parameters.
|
||||||
|
// Those parameters must go to the bootstrap/dcs/postgresql/parameters section.
|
||||||
|
// See http://patroni.readthedocs.io/en/latest/dynamic_configuration.html.
|
||||||
func isBootstrapOnlyParameter(param string) bool {
|
func isBootstrapOnlyParameter(param string) bool {
|
||||||
return param == "max_connections" ||
|
return param == "max_connections" ||
|
||||||
param == "max_locks_per_transaction" ||
|
param == "max_locks_per_transaction" ||
|
||||||
|
|||||||
Reference in New Issue
Block a user