http://www.pgpool.net/docs/latest/ja/html/tutorial-testing-failover.html
https://www.howtoforge.com/tutorial/how-to-set-up-nginx-high-availability-with-pacemaker-corosync-on-centos-7/
http://www.pgpool.net/pgpool-web/contrib_docs/watchdog_master_slave_3.3/ja.html
https://qiita.com/U_ikki/items/e117acad0413546d6923
http://www.pgpool.net/mediawiki/jp/index.php/FAQ
https://lets.postgresql.jp/documents/technical/pgpool/3
参考
https://lets.postgresql.jp/documents/technical/pgpool-II-3.3-watchdog/1
http://www.alexlinux.com/pacemaker-corosync-nginx-cluster/
yum install postgresql-server -y
host replication replica 127.0.0.1/32 md5
host replication replica 192.168.72.130/32 md5
host replication replica 192.168.72.131/32 md5
systemctl stop postgresql
systemctl start postgresql
pg_basebackup -h 192.168.72.131 -U replica -D /var/lib/pgsql/data -P --xlog
scp 192.168.72.131:/var/lib/pgsql/archive/%f %p
host=192.168.72.131 port=5432 user=replica password=******** application_name=slave01
psql -h 192.168.72.131 -U replica -W -d replication
psql postgres -c "SELECT * FROM pg_stat_replication"
psql -h 192.168.72.131 -p 5432 -l
psql -h 192.168.72.130 -p 5432 -l
yum install http://www.pgpool.net/yum/rpms/3.3/redhat/rhel-7-x86_64/pgpool-II-pg92-3.3.12-1pgdg.rhel7.x86_64.rpm
yum install http://www.pgpool.net/yum/rpms/3.3/redhat/rhel-7-x86_64/pgpool-II-release-3.3-1.noarch.rpm
yum install pgpool-II-pg92
pgpool -n -f /etc/pgpool-II/pgpool.conf > pgpool.log 2>&1
mkdir -p /home/apache/sbin
chown apache:apache /home/apache/sbin
chmod 700 /home/apache/sbin
cp /sbin/ifconfig /home/apache/sbin
cp /usr/sbin/arping /home/apache/sbin
chmod 4755 /home/apache/sbin/ifconfig
chmod 4755 /home/apache/sbin/arping
firewall-cmd --add-port=8009/tcp --zone=public --permanent
firewall-cmd --add-port=9999/tcp --zone=public --permanent
firewall-cmd --add-port=9000/tcp --zone=public --permanent
firewall-cmd --add-port=9694/tcp --zone=public --permanent
firewall-cmd --reload
firewall-cmd --list-all --zone=public
firewall-cmd --list-services --zone=public
firewall-cmd --list-ports --zone=public
psql -h 192.168.72.140 -p 9999 -l
ping 192.168.72.140
CREATE ROLE root WITH LOGIN PASSWORD 'asdf1';
/sbin/ifconfig | grep ens33:0 -1
ifconfig ens33:1 inet 192.168.72.140 netmask 255.255.255.0
ifconfig ens33:1 down
ifconfig ens33:0 del 192.168.72.140
arping -U 192.168.72.140 -w 1 -I ens33:1
psql -h 192.168.72.140 -p 9999 -U postgres -c "INSERT INTO test_table VALUES (1)"
psql -h 192.168.72.140 -p 9999 -U postgres -c "SELECT * FROM test_table"
systemctl enable pgpool.service
systemctl start pgpool.service
systemctl stop pgpool.service
https://www.howtoforge.com/tutorial/how-to-set-up-nginx-high-availability-with-pacemaker-corosync-on-centos-7/
http://www.pgpool.net/pgpool-web/contrib_docs/watchdog_master_slave_3.3/ja.html
https://qiita.com/U_ikki/items/e117acad0413546d6923
http://www.pgpool.net/mediawiki/jp/index.php/FAQ
https://lets.postgresql.jp/documents/technical/pgpool/3
参考
https://lets.postgresql.jp/documents/technical/pgpool-II-3.3-watchdog/1
http://www.alexlinux.com/pacemaker-corosync-nginx-cluster/
yum install postgresql-server -y
host replication replica 127.0.0.1/32 md5
host replication replica 192.168.72.130/32 md5
host replication replica 192.168.72.131/32 md5
systemctl stop postgresql
systemctl start postgresql
pg_basebackup -h 192.168.72.131 -U replica -D /var/lib/pgsql/data -P --xlog
scp 192.168.72.131:/var/lib/pgsql/archive/%f %p
host=192.168.72.131 port=5432 user=replica password=******** application_name=slave01
psql -h 192.168.72.131 -U replica -W -d replication
psql postgres -c "SELECT * FROM pg_stat_replication"
psql -h 192.168.72.131 -p 5432 -l
psql -h 192.168.72.130 -p 5432 -l
yum install http://www.pgpool.net/yum/rpms/3.3/redhat/rhel-7-x86_64/pgpool-II-pg92-3.3.12-1pgdg.rhel7.x86_64.rpm
yum install http://www.pgpool.net/yum/rpms/3.3/redhat/rhel-7-x86_64/pgpool-II-release-3.3-1.noarch.rpm
yum install pgpool-II-pg92
pgpool -n -f /etc/pgpool-II/pgpool.conf > pgpool.log 2>&1
mkdir -p /home/apache/sbin
chown apache:apache /home/apache/sbin
chmod 700 /home/apache/sbin
cp /sbin/ifconfig /home/apache/sbin
cp /usr/sbin/arping /home/apache/sbin
chmod 4755 /home/apache/sbin/ifconfig
chmod 4755 /home/apache/sbin/arping
firewall-cmd --add-port=8009/tcp --zone=public --permanent
firewall-cmd --add-port=9999/tcp --zone=public --permanent
firewall-cmd --add-port=9000/tcp --zone=public --permanent
firewall-cmd --add-port=9694/tcp --zone=public --permanent
firewall-cmd --reload
firewall-cmd --list-all --zone=public
firewall-cmd --list-services --zone=public
firewall-cmd --list-ports --zone=public
psql -h 192.168.72.140 -p 9999 -l
ping 192.168.72.140
CREATE ROLE root WITH LOGIN PASSWORD 'asdf1';
/sbin/ifconfig | grep ens33:0 -1
ifconfig ens33:1 inet 192.168.72.140 netmask 255.255.255.0
ifconfig ens33:1 down
ifconfig ens33:0 del 192.168.72.140
arping -U 192.168.72.140 -w 1 -I ens33:1
psql -h 192.168.72.140 -p 9999 -U postgres -c "INSERT INTO test_table VALUES (1)"
psql -h 192.168.72.140 -p 9999 -U postgres -c "SELECT * FROM test_table"
systemctl enable pgpool.service
systemctl start pgpool.service
systemctl stop pgpool.service