<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Date: Mon, May 15, 2023 at 9:42 AM<br>Subject: Re: [pgpool-general: 8763] Fwd: Pgpool II/Watchdog HA configuration Question:<br>To: Bo Peng <<a href="mailto:pengbo@sraoss.co.jp">pengbo@sraoss.co.jp</a>><br></div><br><br><div dir="ltr">Thank you Bo, for responding,  <div>I have already have that parameter enabled:</div><div> <b>enable_consensus_with_half_votes = on<br></b></div><div><br></div><div><br></div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><i>rn000110724 - 10.50.28.58 - MASTER NODE:
</i>><i> 
</i>><i> rn000110733 – 10.201.36.72 – STANDBY NODE
</i>><i> 
</i>><i> Delegate IP : 10.50.28.80</i></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><i><br></i></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><i>The Delegate IP works on Master NODE and am able to PING from remote host and client can connect,</i></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><i>even if Standby NODE is down Delegate IP still works, </i></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><i><br></i></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><i>but Delegate IP stops working when I shutdown Master node, and STandby becomes new Mster,</i></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><i>the Delegate IP moves to Standby and I can ping it locally but it wont ping outside of Standby:</i></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><i>so basically delegate IP stops working outside of box when it fails to Standby node: </i></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><pre style="white-space:pre-wrap"><span style="color:rgb(80,0,80);font-family:Arial,Helvetica,sans-serif;white-space:normal">rn000110733 – 10.201.36.72 </span></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><br></pre>Appreciate any ideas or clues..</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">unless this is resolved we can't use PGPOOL II as HA

</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Thank you</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Kishore.

<span style="color:rgb(80,0,80);font-family:Arial,Helvetica,sans-serif;white-space:normal"> rn000110733 – 10.201.36.72  -- Acquired delegate IP (New master)<br>><br>><br>><br>> sh-4.4# ifconfig<br>><br>> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500<br>>>         inet 10.201.36.72  netmask 255.255.252.0  broadcast 10.201.39.255<br>>>         ether 00:50:56:9c:12:9d  txqueuelen 1000  (Ethernet)<br>>>         RX packets 652871  bytes 115519655 (110.1 MiB)<br>>>         RX errors 0  dropped 505  overruns 0  frame 0<br>>>         TX packets 286480  bytes 125140983 (119.3 MiB)<br>>>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<br>><br>><br>><br>> eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500<br>></span><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;white-space:normal">>         inet *10.50.28.80  netmask 255.255.255.0  broadcast 0.0.0.0*</span><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;white-space:normal"><div style="margin:5px 0px"><div id="m_-6634417109662838349gmail-q_96" style="background-color:rgb(232,234,237);border:none;clear:both;line-height:6px;outline:none;width:24px;color:rgb(80,0,80);font-size:11px;border-radius:5.5px"><div style="background:url("https://www.gstatic.com/images/icons/material/system_gm/1x/more_horiz_black_20dp.png") 50% 50%/20px no-repeat;height:11px;opacity:0.71;width:24px"></div></div></div></div><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;white-space:normal">> Can ping and connect *locally *from new Master PGPOOL Node:</span>

</pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 15, 2023 at 5:07 AM Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
If you have 2 pgpool nodes and when one pgpool goes down,<br>
pgpool lose quorum and stop bringing up the delegate IP.<br>
<br>
If you want to ensure that delegate IP is available even if<br>
only one pgpool is running, you need to set:<br>
<br>
 enable_consensus_with_half_votes = on <br>
<br>
However, you should aware that you may run the risk of split brain<br>
by enabling this parameter.<br>
<br>
<a href="https://www.pgpool.net/docs/latest/en/html/runtime-watchdog-config.html#guc-enable-consensus-with-half-votes" rel="noreferrer" target="_blank">https://www.pgpool.net/docs/latest/en/html/runtime-watchdog-config.html#guc-enable-consensus-with-half-votes</a><br>
<br>
On Sun, 14 May 2023 17:46:54 -0400<br>
KiSh USA <<a href="mailto:coffeewithkish@gmail.com" target="_blank">coffeewithkish@gmail.com</a>> wrote:<br>
<br>
> Hello Team,<br>
> <br>
> <br>
> <br>
> My PGPOOL II 2 node configuration works perfectly when both nodes are up, I<br>
> can ping to my Delegate IP also connect clients through Delegate IP etc..<br>
> <br>
> <br>
> <br>
> But when I shutdown Master PGPOOL II node, and it fails over to STANDBY<br>
> NODE (which is now New Master) am unable to ping/connect using delegate IP<br>
> <br>
> From remote client, I can ping locally in the new Master and connect, but<br>
> not from clients,<br>
> <br>
> Basically, as soon as I stop master node, the delegated IP stops<br>
> responding. As a result, databases are unavailable.<br>
> <br>
> <br>
> <br>
> Bcoz of this issue am unable to implement HA for PGPOOL II nodes,  can you<br>
> please advise…<br>
> <br>
> <br>
> <br>
>  Thanks in advance.<br>
> <br>
> <br>
> <br>
> NOTES:<br>
> <br>
> <br>
> PGPOOL II NODES:<br>
> <br>
> <br>
> <br>
> rn000110724 - 10.50.28.58 - MASTER NODE:<br>
> <br>
> rn000110733 – 10.201.36.72 – STANDBY NODE<br>
> <br>
> Delegate IP : 10.50.28.80<br>
> <br>
> <br>
> <br>
> sh-4.4# pcp_watchdog_info -h 10.50.28.58 -p 9898 -U pgpcp -v<br>
> <br>
> Password:<br>
> <br>
> Watchdog Cluster Information<br>
> <br>
> Total Nodes          : 2<br>
> <br>
> Remote Nodes         : 1<br>
> <br>
> Quorum state         : QUORUM EXIST<br>
> <br>
> Alive Remote Nodes   : 1<br>
> <br>
> VIP up on local node : YES<br>
> <br>
> Master Node Name     : rn000110724:9999 Linux rn000110724<br>
> <br>
> Master Host Name     : rn000110724<br>
> <br>
> <br>
> <br>
> Watchdog Node Information<br>
> <br>
> Node Name      : rn000110724:9999 Linux rn000110724<br>
> <br>
> Host Name      : rn000110724<br>
> <br>
> Delegate IP    : 10.50.28.80<br>
> <br>
> Pgpool port    : 9999<br>
> <br>
> Watchdog port : 9000<br>
> <br>
> Node priority : 0<br>
> <br>
> Status         : 4<br>
> <br>
> Status Name    : MASTER<br>
> <br>
> <br>
> <br>
> Node Name      : rn000110733:9999 Linux rn000110733<br>
> <br>
> Host Name      : rn000110733<br>
> <br>
> Delegate IP    : 10.50.28.80<br>
> <br>
> Pgpool port    : 9999<br>
> <br>
> Watchdog port : 9000<br>
> <br>
> Node priority : 0<br>
> <br>
> Status         : 7<br>
> <br>
> Status Name    : STANDBY<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> sh-4.4# pcp_watchdog_info -h 10.201.36.72 -p 9898 -U pgpcp -v<br>
> <br>
> Password:<br>
> <br>
> Watchdog Cluster Information<br>
> <br>
> Total Nodes          : 2<br>
> <br>
> Remote Nodes         : 1<br>
> <br>
> Quorum state         : QUORUM EXIST<br>
> <br>
> Alive Remote Nodes   : 1<br>
> <br>
> VIP up on local node : NO<br>
> <br>
> Master Node Name     : rn000110724:9999 Linux rn000110724<br>
> <br>
> Master Host Name     : rn000110724<br>
> <br>
> <br>
> <br>
> Watchdog Node Information<br>
> <br>
> Node Name      : rn000110733:9999 Linux rn000110733<br>
> <br>
> Host Name      : rn000110733<br>
> <br>
> Delegate IP    : 10.50.28.80<br>
> <br>
> Pgpool port    : 9999<br>
> <br>
> Watchdog port : 9000<br>
> <br>
> Node priority : 0<br>
> <br>
> Status         : 7<br>
> <br>
> Status Name    : STANDBY<br>
> <br>
> <br>
> <br>
> Node Name      : rn000110724:9999 Linux rn000110724<br>
> <br>
> Host Name      : rn000110724<br>
> <br>
> Delegate IP    : 10.50.28.80<br>
> <br>
> Pgpool port    : 9999<br>
> <br>
> Watchdog port : 9000<br>
> <br>
> Node priority : 0<br>
> <br>
> Status         : 4<br>
> <br>
> Status Name    : MASTER<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> rn000110724 - 10.50.28.58  - Master node:<br>
> <br>
> sh-4.4# ifconfig<br>
> <br>
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500<br>
> <br>
>         inet 10.50.28.58  netmask 255.255.252.0  broadcast 10.50.31.255<br>
> <br>
>         ether 00:50:56:a8:27:eb  txqueuelen 1000  (Ethernet)<br>
> <br>
>         RX packets 768864  bytes 120999407 (115.3 MiB)<br>
> <br>
>         RX errors 0  dropped 0  overruns 0  frame 0<br>
> <br>
>         TX packets 343573  bytes 123312342 (117.5 MiB)<br>
> <br>
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<br>
> <br>
> <br>
> <br>
> eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500<br>
> <br>
>         inet 10.50.28.80  netmask 255.255.255.0  broadcast 0.0.0.0<br>
> <br>
>         ether 00:50:56:a8:27:eb  txqueuelen 1000  (Ethernet)<br>
> <br>
> <br>
> <br>
> lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> Can ping/connect using  Delegate IP from Remote host:<br>
> <br>
> <br>
> <br>
> /usr/bin/psql -h 10.50.28.80  -p 9999 -d postgres -U pgpool<br>
> <br>
> Password for user pgpool:<br>
> <br>
> psql (14.2)<br>
> <br>
> postgres=# \l<br>
> <br>
>                                  List of databases<br>
> <br>
>      Name      |  Owner   | Encoding | Collate | Ctype |     Access<br>
> privileges<br>
> <br>
> ---------------+----------+----------+---------+-------+----------------------------<br>
> <br>
> postgres      | postgres | UTF8     | C       | C     |<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> postgres=# show pool_nodes ;<br>
> <br>
> node_id |  hostname   | port | status | lb_weight |  role   | select_cnt |<br>
> load_balance_node | replication_delay | replication_state |<br>
> replication_sync_s<br>
> <br>
> tate | last_status_change<br>
> <br>
> ---------+-------------+------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+-------------------<br>
> <br>
> -----+---------------------<br>
> <br>
> 0       | rn000098071 | 5432 | up     | 0.000000  | primary | 1          |<br>
> true              | 0                 |<br>
> |<br>
> <br>
>      | 2023-05-14 10:31:43<br>
> <br>
> 1       | rn000098069 | 5432 | up     | 1.000000  | standby | 0          |<br>
> false             | 0                 |<br>
> |<br>
> <br>
>      | 2023-05-14 10:31:43<br>
> <br>
> (2 rows)<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> postgres@rn000098071:/var/lib/pgsql<br>
> <br>
> $ ping 10.50.28.80<br>
> <br>
> PING 10.50.28.80 (10.50.28.80) 56(84) bytes of data.<br>
> <br>
> 64 bytes from <a href="http://10.50.28.80" rel="noreferrer" target="_blank">10.50.28.80</a>: icmp_seq=1 ttl=55 time=0.728 ms<br>
> <br>
> 64 bytes from <a href="http://10.50.28.80" rel="noreferrer" target="_blank">10.50.28.80</a>: icmp_seq=2 ttl=55 time=0.490 ms<br>
> <br>
> 64 bytes from <a href="http://10.50.28.80" rel="noreferrer" target="_blank">10.50.28.80</a>: icmp_seq=3 ttl=55 time=0.376 ms<br>
> <br>
> 64 bytes from <a href="http://10.50.28.80" rel="noreferrer" target="_blank">10.50.28.80</a>: icmp_seq=4 ttl=55 time=0.477 ms<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> cat pgpool.conf<br>
> <br>
> <br>
> <br>
> #------------------------------------------------------------------------------<br>
> <br>
> # WATCHDOG<br>
> <br>
> #------------------------------------------------------------------------------<br>
> <br>
> <br>
> <br>
> # - Enabling -<br>
> <br>
> <br>
> <br>
> use_watchdog = *on *                  # Activates watchdog<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> # -Connection to up stream servers -<br>
> <br>
> <br>
> <br>
> trusted_servers = ''<br>
> <br>
>                                     # trusted server list which are used<br>
> <br>
>                                     # to confirm network connection<br>
> <br>
>                                     # (hostA,hostB,hostC,...)<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> ping_path = '/bin'<br>
> <br>
>                                     # ping command path<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> # - Watchdog communication Settings -<br>
> <br>
> <br>
> <br>
> wd_hostname = '*rn000110724*'<br>
> <br>
>                                     # Host name or IP address of this<br>
> watchdog<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_port = *9000*<br>
> <br>
>                                     # port number for watchdog service<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_priority = *0*<br>
> <br>
>                                     # priority of this watchdog in leader<br>
> election<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> wd_authkey = ''<br>
> <br>
>                                     # Authentication key for watchdog<br>
> communication<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> wd_ipc_socket_dir = '/var/run/postgresql'<br>
> <br>
>                                     # Unix domain socket path for watchdog<br>
> IPC socket<br>
> <br>
>                                     # The Debian package defaults to<br>
> <br>
>                                     # /var/run/postgresql<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> # - Virtual IP control Setting -<br>
> <br>
> <br>
> <br>
> delegate_IP = *'10.50.28.80*'<br>
> <br>
>                                     # delegate IP address<br>
> <br>
>                                     # If this is empty, virtual IP never<br>
> bring up.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> if_cmd_path = '/sbin'<br>
> <br>
>                                     # path to the directory where<br>
> if_up/down_cmd exists<br>
> <br>
>                                     # If if_up/down_cmd starts with "/",<br>
> if_cmd_path will be ignored.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> if_up_cmd = '/usr/bin/sudo /sbin/ip addr add $_IP_$/24 dev eth0 label<br>
> eth0:0'<br>
> <br>
>                                     # startup delegate IP command<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> if_down_cmd = '/usr/bin/sudo /sbin/ip addr del $_IP_$/24 dev eth0'<br>
> <br>
>                                     # shutdown delegate IP command<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> arping_path = '/usr/sbin'<br>
> <br>
>                                     # arping command path<br>
> <br>
>                                     # If arping_cmd starts with "/",<br>
> if_cmd_path will be ignored.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> arping_cmd = '/usr/bin/sudo /usr/sbin/arping -U $_IP_$ -w 1 -I eth0'<br>
> <br>
>                                     # arping command<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> ifconfig_path = '/etc/pgpool-II'<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> # - Behaivor on escalation Setting -<br>
> <br>
> <br>
> <br>
> clear_memqcache_on_escalation = *on*<br>
> <br>
>                                     # Clear all the query cache on shared<br>
> memory<br>
> <br>
>                                     # when standby pgpool escalate to<br>
> active pgpool<br>
> <br>
>                                     # (= virtual IP holder).<br>
> <br>
>                                     # This should be off if client connects<br>
> to pgpool<br>
> <br>
>                                     # not using virtual IP.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_escalation_command = '/etc/pgpool-II/escalation.sh'<br>
> <br>
>                                     # Executes this command at escalation<br>
> on new active pgpool.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_de_escalation_command = ''<br>
> <br>
>                                     # Executes this command when master<br>
> pgpool resigns from being master.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> # - Watchdog consensus settings for failover -<br>
> <br>
> <br>
> <br>
> failover_when_quorum_exists = on<br>
> <br>
>                                     # Only perform backend node failover<br>
> <br>
>                                     # when the watchdog cluster holds the<br>
> quorum<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> failover_require_consensus = on<br>
> <br>
>                                     # Perform failover when majority of<br>
> Pgpool-II nodes<br>
> <br>
>                                     # aggrees on the backend node status<br>
> change<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> allow_multiple_failover_requests_from_node = off<br>
> <br>
>                                     # A Pgpool-II node can cast multiple<br>
> votes<br>
> <br>
>                                     # for building the consensus on failover<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> #enable_consensus_with_half_votes = off<br>
> <br>
> enable_consensus_with_half_votes = on<br>
> <br>
>                                     # apply majority rule for consensus and<br>
> quorum computation<br>
> <br>
>                                     # at 50% of votes in a cluster with<br>
> even number of nodes.<br>
> <br>
>                                     # when enabled the existence of quorum<br>
> and consensus<br>
> <br>
>                                     # on failover is resolved after<br>
> receiving half of the<br>
> <br>
>                                     # total votes in the cluster, otherwise<br>
> both these<br>
> <br>
>                                     # decisions require at least one more<br>
> vote than<br>
> <br>
>                                     # half of the total votes.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> # - Lifecheck Setting -<br>
> <br>
> <br>
> <br>
> # -- common --<br>
> <br>
> <br>
> <br>
> wd_monitoring_interfaces_list = ''  # Comma separated list of interfaces<br>
> names to monitor.<br>
> <br>
>                                     # if any interface from the list is<br>
> active the watchdog will<br>
> <br>
>                                     # consider the network is fine<br>
> <br>
>                                     # 'any' to enable monitoring on all<br>
> interfaces except loopback<br>
> <br>
>                                     # '' to disable monitoring<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> wd_lifecheck_method = 'heartbeat'<br>
> <br>
>                                     # Method of watchdog lifecheck<br>
> ('heartbeat' or 'query' or 'external')<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_interval = 10<br>
> <br>
>                                     # lifecheck interval (sec) > 0<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> # -- heartbeat mode --<br>
> <br>
> <br>
> <br>
> wd_heartbeat_port = 9694<br>
> <br>
>                                     # Port number for receiving heartbeat<br>
> signal<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_heartbeat_keepalive = 2<br>
> <br>
>                                     # Interval time of sending heartbeat<br>
> signal (sec)<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_heartbeat_deadtime = 30<br>
> <br>
>                                     # Deadtime interval for heartbeat<br>
> signal (sec)<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> #heartbeat_destination0 = 'host0_ip1'<br>
> <br>
> #heartbeat_destination0 = '10.201.36.72'# Host name or IP address of<br>
> destination 0<br>
> <br>
> heartbeat_destination0 = '10.50.28.58' # for sending heartbeat signal.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> heartbeat_destination_port0 = 9694<br>
> <br>
>                                     # Port number of destination 0 for<br>
> sending<br>
> <br>
>                                     # heartbeat signal. Usually this is the<br>
> <br>
>                                     # same as wd_heartbeat_port.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> heartbeat_device0 = ''<br>
> <br>
>                                     # Name of NIC device (such like 'eth0')<br>
> <br>
>                                     # used for sending/receiving heartbeat<br>
> <br>
>                                     # signal to/from destination 0.<br>
> <br>
>                                     # This works only when this is not empty<br>
> <br>
>                                     # and pgpool has root privilege.<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> heartbeat_destination1 = *'10.201.36.72*'<br>
> <br>
> heartbeat_destination_port1 = 9694<br>
> <br>
> #heartbeat_device1 = ''<br>
> <br>
> <br>
> <br>
> # -- query mode --<br>
> <br>
> <br>
> <br>
> wd_life_point = 3<br>
> <br>
>                                     # lifecheck retry times<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_lifecheck_query = 'SELECT 1'<br>
> <br>
>                                     # lifecheck query to pgpool from<br>
> watchdog<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_lifecheck_dbname = 'template1'<br>
> <br>
>                                     # Database name connected for lifecheck<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_lifecheck_user = 'nobody'<br>
> <br>
>                                     # watchdog user monitoring pgpools in<br>
> lifecheck<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> wd_lifecheck_password = ''<br>
> <br>
>                                     # Password for watchdog user in<br>
> lifecheck<br>
> <br>
>                                     # Leaving it empty will make Pgpool-II<br>
> to first look for the<br>
> <br>
>                                     # Password in pool_passwd file before<br>
> using the empty password<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> # - Other pgpool Connection Settings -<br>
> <br>
> other_pgpool_hostname0 = '*rn000110733*'<br>
> <br>
> other_pgpool_port0 = 9999          # Port number for other pgpool 0<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> other_wd_port0 = 9000<br>
> <br>
>                                     # Port number for other watchdog 0<br>
> <br>
>                                     # (change requires restart)<br>
> <br>
> <br>
> <br>
> #other_pgpool_hostname1 = 'host1'<br>
> <br>
> #other_pgpool_port1 = 5432<br>
> <br>
> #other_wd_port1 = 9000<br>
> <br>
> #other_wd_port0 = 9000<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> PART II:<br>
> <br>
> <br>
> <br>
> PGPOOL II NODES:<br>
> <br>
> <br>
> <br>
> rn000110724 - 10.50.28.58 - MASTER NODE:<br>
> <br>
> rn000110733 – 10.201.36.72 – STANDBY NODE<br>
> <br>
> Delegate IP : 10.50.28.80<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> *Shutdown PGPOOL II on current Master : *<br>
> <br>
> rn000110724 - 10.50.28.58 - MASTER NODE:<br>
> <br>
> <br>
> <br>
> LOG<br>
> <br>
> 2023-05-14 16:12:44: pid 79354: LOG:  Watchdog is shutting down<br>
> <br>
> 2023-05-14 16:12:44: pid 113361: LOG:  watchdog: de-escalation started<br>
> <br>
> 2023-05-14 16:12:44: pid 113361: LOG:  successfully released the delegate<br>
> IP:"10.50.28.80"<br>
> <br>
> 2023-05-14 16:12:44: pid 113361: DETAIL:  'if_down_cmd' returned with<br>
> success<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> rn000110733 – 10.201.36.72<br>
> <br>
> New Master LOG<br>
> <br>
> <br>
> <br>
> 2023-05-14 16:12:44: pid 88197: LOG:  remote node "rn000110724:9999 Linux<br>
> rn000110724" is shutting down<br>
> <br>
> 2023-05-14 16:12:44: pid 88197: LOG:  watchdog cluster has lost the<br>
> coordinator node<br>
> <br>
> 2023-05-14 16:12:44: pid 88197: LOG:  removing the remote node<br>
> "rn000110724:9999 Linux rn000110724" from watchdog cluster master<br>
> <br>
> 2023-05-14 16:12:44: pid 88197: LOG:  We have lost the cluster master node<br>
> "rn000110724:9999 Linux rn000110724"<br>
> <br>
> 2023-05-14 16:12:44: pid 88197: LOG:  watchdog node state changed from<br>
> [STANDBY] to [JOINING]<br>
> <br>
> 2023-05-14 16:12:48: pid 88197: LOG:  watchdog node state changed from<br>
> [JOINING] to [INITIALIZING]<br>
> <br>
> 2023-05-14 16:12:49: pid 88197: LOG:  I am the only alive node in the<br>
> watchdog cluster<br>
> <br>
> 2023-05-14 16:12:49: pid 88197: HINT:  skipping stand for coordinator state<br>
> <br>
> 2023-05-14 16:12:49: pid 88197: LOG:  watchdog node state changed from<br>
> [INITIALIZING] to [MASTER]<br>
> <br>
> 2023-05-14 16:12:49: pid 88197: LOG:  I am announcing my self as<br>
> master/coordinator watchdog node<br>
> <br>
> 2023-05-14 16:12:53: pid 88197: LOG:  I am the cluster leader node<br>
> <br>
> 2023-05-14 16:12:57: pid 118646: LOG*:  successfully acquired the delegate<br>
> IP:"10.50.28.80"*<br>
> <br>
> 2023-05-14 16:13:22: pid 88197: LOG:  remote node "rn000110724:9999 Linux<br>
> rn000110724" is shutting down<br>
> <br>
> 2023-05-14 16:13:32: pid 88197: LOG:  new IPC connection received<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> rn000110733 – 10.201.36.72  -- Acquired delegate IP<br>
> <br>
> <br>
> <br>
> sh-4.4# ifconfig<br>
> <br>
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500<br>
> <br>
>         inet 10.201.36.72  netmask 255.255.252.0  broadcast 10.201.39.255<br>
> <br>
>         ether 00:50:56:9c:12:9d  txqueuelen 1000  (Ethernet)<br>
> <br>
>         RX packets 652871  bytes 115519655 (110.1 MiB)<br>
> <br>
>         RX errors 0  dropped 505  overruns 0  frame 0<br>
> <br>
>         TX packets 286480  bytes 125140983 (119.3 MiB)<br>
> <br>
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0<br>
> <br>
> <br>
> <br>
> eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500<br>
> <br>
>         inet *10.50.28.80  netmask 255.255.255.0  broadcast 0.0.0.0*<br>
> <br>
>         ether 00:50:56:9c:12:9d  txqueuelen 1000  (Ethernet)<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> rn000110733 – 10.201.36.72  - New Master:<br>
> <br>
> <br>
> <br>
> sh-4.4# pcp_watchdog_info -h 10.201.36.72 -p 9898 -U pgpcp -v<br>
> <br>
> Password:<br>
> <br>
> Watchdog Cluster Information<br>
> <br>
> Total Nodes          : 2<br>
> <br>
> Remote Nodes         : 1<br>
> <br>
> Quorum state         : QUORUM IS ON THE EDGE<br>
> <br>
> Alive Remote Nodes   : 0<br>
> <br>
> VIP up on local node : YES<br>
> <br>
> Master Node Name     : rn000110733:9999 Linux rn000110733<br>
> <br>
> Master Host Name     : rn000110733<br>
> <br>
> <br>
> <br>
> Watchdog Node Information<br>
> <br>
> Node Name      : rn000110733:9999 Linux rn000110733<br>
> <br>
> Host Name      : rn000110733<br>
> <br>
> Delegate IP    : 10.50.28.80<br>
> <br>
> Pgpool port    : 9999<br>
> <br>
> Watchdog port  : 9000<br>
> <br>
> Node priority  : 0<br>
> <br>
> Status         : 4<br>
> <br>
> Status Name    : MASTER<br>
> <br>
> <br>
> <br>
> Node Name      : rn000110724:9999 Linux rn000110724<br>
> <br>
> Host Name      : rn000110724<br>
> <br>
> Delegate IP    : 10.50.28.80<br>
> <br>
> Pgpool port    : 9999<br>
> <br>
> Watchdog port  : 9000<br>
> <br>
> Node priority  : 0<br>
> <br>
> Status         : 10<br>
> <br>
> Status Name    : SHUTDOWN<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> Can ping and connect *locally *from new Master PGPOOL Node:<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> sh-4.4# ping 10.50.28.80<br>
> <br>
> PING 10.50.28.80 (10.50.28.80) 56(84) bytes of data.<br>
> <br>
> 64 bytes from <a href="http://10.50.28.80" rel="noreferrer" target="_blank">10.50.28.80</a>: icmp_seq=1 ttl=64 time=0.023 ms<br>
> <br>
> 64 bytes from <a href="http://10.50.28.80" rel="noreferrer" target="_blank">10.50.28.80</a>: icmp_seq=2 ttl=64 time=0.021 ms<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> sh-4.4# /usr/bin/psql -h *10.50.28.80*  -p 9999 -d postgres -U pgpool<br>
> <br>
> Password for user pgpool:<br>
> <br>
> postgres=#<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> But from Client host unable to ping:<br>
> <br>
> <br>
> <br>
> $  /usr/bin/psql -h 10.50.28.80  -p 9999 -d postgres -U pgpool<br>
> <br>
> psql: error: connection to server at "10.50.28.80", port 9999 failed: No<br>
> route to host<br>
> <br>
>         Is the server running on that host and accepting TCP/IP connections?<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> postgres@rn000098071:/var/lib/pgsql<br>
> <br>
> $ ping 10.50.28.80<br>
> <br>
> PING 10.50.28.80 (10.50.28.80) 56(84) bytes of data.<br>
> <br>
> From 10.50.28.1 icmp_seq=1 Destination Host Unreachable<br>
> <br>
> From 10.50.28.1 icmp_seq=3 Destination Host Unreachable<br>
> <br>
> From 10.50.28.1 icmp_seq=2 Destination Host Unreachable<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> *Thank you!*<br>
> <br>
> Kishore<br>
<br>
<br>
-- <br>
Bo Peng <<a href="mailto:pengbo@sraoss.co.jp" target="_blank">pengbo@sraoss.co.jp</a>><br>
SRA OSS LLC<br>
<a href="https://www.sraoss.co.jp/" rel="noreferrer" target="_blank">https://www.sraoss.co.jp/</a><br>
</blockquote></div>
</div></div>