do the right thing on failovers on pgbdr

This commit is contained in:
Kevin Fenzi 2017-05-26 19:20:41 +00:00
parent 85de66a9ba
commit 3a7972233a
2 changed files with 4 additions and 0 deletions

View file

@ -14,11 +14,13 @@ fi
# We are becoming the backup node
#
if [ $STATE == "BACKUP" ]; then
systemctl restart posgresql-9.4
logger "just became keepalived backup"
fi
#
# something horrible has gone wrong
#
if [ $STATE == "FAULT" ]; then
systemctl stop posgresql-9.4
logger "just had a keepalived fault"
fi

View file

@ -14,11 +14,13 @@ fi
# We are becoming the backup node
#
if [ $STATE == "BACKUP" ]; then
systemctl restart posgresql-9.4
logger "just became keepalived backup"
fi
#
# something horrible has gone wrong
#
if [ $STATE == "FAULT" ]; then
systemctl stop posgresql-9.4
logger "just had a keepalived fault"
fi