Ubuntu Pastebin

Paste from xelset at Mon, 25 Apr 2016 14:20:06 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#!/bin/sh
failed_node=$1
new_master=$2
(
 date
 echo "Failed node: $failed_node"
 echo `ps aux | grep failover`
 set -x
 sudo -u postgres "/usr/bin/ssh -T -l postgres $new_master '/usr/bin/repmgr -f /etc/repmgr.conf standby promote -v 2>var/lib/postgresql/repmgr.log 1>/var/lib/postgresql/repmgr2.log <&-'"
 exit 0;
) 2>&1 | tee -a /tmp/pgpool_failover.log
Download as text