[Pgpool-general] PgPool I/II Advice Required

Tatsuo Ishii ishii at sraoss.co.jp
Fri Mar 16 01:31:37 UTC 2007


Hi,

> Hi All,
> 
>  
> 
> We have a requirement where our services need to be available 24/7 and in
> case of a failure the downtime needs to be minimal. We have been directed to
> use PGPool for the failover/connection pooling features. My question is,
> which version of PGPool should we use to test the software, PGPool I or
> PGPool II.
> 
>  
> 
> We currently have the following scenario:
> 
>  
> 
> HOST1:
> 
>             PostgreSQL 8.2.3 Live Production
> 
> HOST2:
> 
>             PostgreSQL 8.2.3 Recovery Mode (Standby Server)
> 
>  
> 
> HOST2 is at most 60 seconds out of sync with HOST1 using PostgreSQL WAL
> shipping.
> 
>  
> 
> What we would like to do is put PGPool in the front with HOST1 defined as
> the primary node and HOST2 as the slave node. How would we go about ensuring
> that PGPool detects a failure on HOST1 then automatically starts to use
> HOST2. Remember though that HOST2 is not available for health checks while
> it is in recovery mode, so I assume that PGPool will run in degen mode.
> However, when the database on HOST2 does become available will PGPool
> automatically start using it, or is it a manual process to get PgPool to
> fail over it's connections to HOST2 after it comes out of standby/recovery
> mode?

I think you could make above possible by setting both replication_mode
and master_slave_mode to false. In this setting, pgpool will use HOST1
as long as it's fine. If HOST1 goes down, pgpool detects error while
trying to connect or read/write packets thus it will trigger
degeration. Of course the health checking should work fine too, since
in the setting above pgpool only checks HOST1. As a result pgpool will
automatically switch to HOST2.

Regarding your concern about the period HOST2 starting up, pgpool will
continue to detect failure until HOSTS2 goes up(not try to switch to
HOST1). However after HOSTS2 goes up, pgpool should be fine. No manual
process required.

So the bottom line is: pgpool should work fine with your setting.
--
Tatsuo Ishii
SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list