[Pgpool-general] pgPool HA set up

Kuczynski, Rafal (LNG-POL) Rafal.Kuczynski at lexisnexis.pl
Tue Oct 18 08:11:47 UTC 2011


>
> I guess true HA really depends on your context.
>
> Say we have two data centers (DC1 and DC2), two PostgreSQL servers (PG1
> and PG2), and two pgpool servers (PGP1 and PGP2). I would have all users
> access to the database through PGP1. Say that DC1 isn't available
> anymore, what I would do is change the IPVS so that all users go through
> PGP2, change PGP2 configuration so that it cannot access to PG1, and
> make sure that PG2 is the new master. Which of course is not automatic,
> there are a few steps that need manual work.
>
> But actually, what you are asking for is quite hard to have.

I have pgpool in HA configuration and it works automatic. 
Like you said, there are two servers for pgpool, and two another for postgres
Servers with PGP1 and PGP2 are sharing virtual ip via UCARP. Clients are connecting to postgres only through this virtual ip (vip).
Normally PGP1 is active, have the vip and have pgpool bind to the vip. On the PGP2 server pgpool is disabled.
When PGP1 goes down, PGP2 takes control on vip and starting its own pgpool which is bind to the vip.
If PG1 is also down, then pgpool on PGP2 will detect that via health check, and PG1 will be shut down.
It all works fine enough. 

My configuration is:
postgres 9.0.4, pgpool 3.0.3, ucarp 1.5.2 on Solaris 10 (x86)

Rafal



More information about the Pgpool-general mailing list