Allow failover so that nodes can be disabled.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-30 12:37:32 +02:00
parent 94fb25467a
commit eb83ff1af1

13
main.go
View File

@@ -550,12 +550,13 @@ func configure(state *global, messageSnapshot []pgpoolConfigMessage) {
weight = j.Weight
}
var flag string
if isPrimary {
flag = "DISALLOW_TO_FAILOVER" //"ALWAYS_PRIMARY|DISALLOW_TO_FAILOVER"
} else {
flag = "DISALLOW_TO_FAILOVER"
}
//var flag string
//if isPrimary {
// flag = "DISALLOW_TO_FAILOVER" //"ALWAYS_PRIMARY|DISALLOW_TO_FAILOVER"
//} else {
// flag = "DISALLOW_TO_FAILOVER"
//}
flag := "ALLOW_TO_FAILOVER"
suffix := strconv.Itoa(num)
conf["backend_hostname"+suffix] = j.IpAddress.String()