[pgpool-general: 9108] Re: Postgres/pgpool HA failover process

Bo Peng pengbo at sraoss.co.jp
Tue May 28 09:00:41 JST 2024


Hi,

> Hello Everyone,
> 
> We are working on to setup a High available solution for postgres and
> running some test cases
> based on that we need some clarification on the HA setup as per the same
> configuration given in this example
> <https://www.pgpool.net/docs/42/en/html/example-cluster.html>

If you want to configure a new cluster,
we recommend using the latest version.

https://www.pgpool.net/docs/latest/en/html/example-cluster.html

> Question - 01
> Regarding the active client connections that are connecting via delegate
> VIP, what happens to those connections during the failover process? If
> either the primary DB goes down (gracefully/crash) then the
> active connection will get hung till the new primary DB is available or
> those active connections get terminated? 

The existing connections will be disconnected if primary DB is down.
However, the subsequent connections will be routed to the new primary.

> What if the same case for Leader pgpool service as well?

Yes.

> Questions - 02
> Configuring the delegate IP:
> a. Are there any standards/limitations for choosing the unused IP as
> delegate IP? I mean like the IP must be within the same subnet range of all
> the nodes in the cluster?

No limitations in Pgpool-II, it depends on the OS.
Pgpool-II using "ip addr ..." command to assign or release a delegate IP.

Below is the parameters:

  if_up_cmd = '/usr/bin/sudo /sbin/ip addr add $_IP_$/24 dev enp0s8 label enp0s8:0'
  if_down_cmd = '/usr/bin/sudo /sbin/ip addr del $_IP_$/24 dev enp0s8'
  arping_cmd = '/usr/bin/sudo /usr/sbin/arping -U $_IP_$ -w 1 -I enp0s8'

You need to make sure the commands work.

> b. Any challenges we see for non-root user to work with VIP? because we run
> the pgpool with non-root user.

You need to make sure the non-root user can execute ip and arping command with sudo
without a password.

-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/



More information about the pgpool-general mailing list