[pgpool-hackers: 1737] watchdog_setup

Tatsuo Ishii ishii at postgresql.org
Fri Jul 29 15:30:14 JST 2016


I have committed the first cut of "watchdog_setup" script under
src/test. watchdog_setup creates specified number of pgpool-II
installaton (default: 3) with watchdog enabled in localhost.

watchdog_setup is intended to test watchdog, and does not suitable for
a production use.

wachdog_setup uses pgpool_setup as a workhorse and you need the script
which comes with pgpool-II source code. Here is an example execution
log.

$ watchdog_setup 
Satrting set up 
============= setting up pgpool 0 =============
Satrting set up in streaming replication mode
creating startall and shutdownall
creating failover script
[snip]
pcp command user name is "t-ishii", password is "t-ishii".
Each PostgreSQL, pgpool-II and pcp port is as follows:
#1 port is 51000
#2 port is 51001
pgpool port is 50008
pcp port is 50009
The info above is in README.port.

$ sh startall
waiting for server to start....24624 2016-07-29 15:06:27 JST LOG:  redirecting log output to logging collector process
24624 2016-07-29 15:06:27 JST HINT:  Future log output will appear in directory "pg_log".
 done
server started
waiting for server to start....24637 2016-07-29 15:06:28 JST LOG:  redirecting log output to logging collector process
24637 2016-07-29 15:06:28 JST HINT:  Future log output will appear in directory "pg_log".
 done
server started

$ ls
pgpool0  pgpool1  pgpool2  shutdownall	startall

$ pcp_watchdog_info -v -p 50001 
Watchdog Cluster Information 
Total Nodes          : 3
Remote Nodes         : 2
Quorum state         : QUORUM EXIST
Alive Remote Nodes   : 2
VIP up on local node : NO
Master Node Name     : Linux_tishii-CF-SX3HE4BP_50008
Master Host Name     : localhost

Watchdog Node Information 
Node Name      : Linux_tishii-CF-SX3HE4BP_50000
Host Name      : localhost
Delegate IP    : Not_Set
Pgpool port    : 50000
Watchdog port  : 50002
Node priority  : 1
Status         : 7
Status Name    : STANDBY

Node Name      : Linux_tishii-CF-SX3HE4BP_50004
Host Name      : localhost
Delegate IP    : Not_Set
Pgpool port    : 50004
Watchdog port  : 50006
Node priority  : 1
Status         : 7
Status Name    : STANDBY

Node Name      : Linux_tishii-CF-SX3HE4BP_50008
Host Name      : localhost
Delegate IP    : Not_Set
Pgpool port    : 50008
Watchdog port  : 50010
Node priority  : 1
Status         : 4
Status Name    : MASTER

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list