[pgpool-general: 3532] Re: Find current PGpool master node
Tatsuo Ishii
ishii at postgresql.org
Tue Mar 17 09:43:47 JST 2015
> Hello all,
>
> Is there a command (show or pcp?) to find the current PGpool master node?
>
> I am using 3.3.1 (about to upgrade) with two PGpool nodes running active /
> active behind an AWS ELB load balancer.
>
> I am not using a VIP, instead relying on the ELB to see that a PGpool has
> gone down and take it out of the load a balancing group.
You mean watchdog master? You can use pcp_watchdog_info.
--------------------------------------------------------------------------------
pcp_watchdog_info V3.3 -
Format
pcp_watchdog_info _timeout_ _host_ _port_ _userid_ _passwd_ [_watchdogid_]
Desc.
Displays the watchdog status of the pgpool-II. _watchdogid_ is the index of other_pgpool_hostname parameter in pgpool.conf.
If this is omitted, display the watchdog status of the pgpool-II specified by _host_:_port_.
Here is an output example:
$ pcp_watchdog_info 10 localhost 9898 postgres hogehoge 0
host1 9999 9000 2
Here is an output example:
The result is in the following order:
1. hostname
2. port number for pgpool-II
3. port number for watchdog
4. watchdog Status
Status is represented by a digit from [1 to 4].
1 - watchdog is not started
2 - Standby: not holding the virtual IP
3 - Active: holding the virtual IP
4 - Down
The load balance weight is displayed in normalized format.
Specifying an invalid watchdog ID will result in an error with exit
tatus 12, and BackendError will be displayed.
--------------------------------------------------------------------------------
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-general
mailing list