pgpool

http://www.pgpool.net/pgpool-web/contrib_docs/watchdog_master_slave/ja.html

  • failover.sh を promote に書き換える

https://hnakamur.github.io/blog/2016/09/15/experiment-postgresql-active-standby-using-pgpool-ii/

listen_addresses

FreeBSD 11.0-RELEASE-p2 pgpool-II version 3.6.1

listen_addresses = '*'
が使えない?
listen_addresses = '0.0.0.0' 
はOK

3.6.2 で修正された

接続数

postgres側から見た最大同時接続数: num_init_children * max_pool
クライアント側から見た最大同時接続数: num_init_children
Listen Backlog: num_init_children * listen_backlog_multiplier

FreeBSD pgpool watchdog arping

pgpool.conf.sample-stream

arping_cmd = 'arping -U $_IP_$ -w 1'

Linux (Ubuntu)

-w deadline
Specify a timeout, in seconds, before arping exits regardless of how many packets have been sent or
received. In this case arping does not stop after count packet are sent, it waits either for deadline
expire or until count probes are answered.

FreeBSD

-w usec
Time to wait between pings, in microseconds.

FreeBSDで -w 1 を指定するとarpingが終了しない → arpingをkillしないとpgpoolが停止しなくなる