Optional fencing script (pre_promote) (#1099)

Call a fencing script after acquiring the leader lock. If the script didn't finish successfully - don't promote but remove leader key

Close https://github.com/zalando/patroni/issues/1567
This commit is contained in:
Sergey Dudoladov
2020-09-01 07:50:39 +02:00
committed by GitHub
parent e87fc12aeb
commit 950eff27ad
8 changed files with 127 additions and 25 deletions
+2
View File
@@ -115,6 +115,8 @@ postgresql:
# same as KRB5CCNAME used by the GSS
# krb_server_keyfile: /var/spool/keytabs/postgres
unix_socket_directories: '.'
# Additional fencing script executed after acquiring the leader lock but before promoting the replica
#pre_promote: /path/to/pre_promote.sh
#watchdog:
# mode: automatic # Allowed values: off, automatic, required