[Pgpool-general] Master/Slave Load Balancing Configuration

Yoshiyuki Asaba y-asaba at sraoss.co.jp
Fri Jan 4 08:57:21 UTC 2008


Hi,

From: Ow Mun Heng <Ow.Mun.Heng at wdc.com>
Subject: [Pgpool-general] Master/Slave Load Balancing Configuration
Date: Thu, 03 Jan 2008 11:40:54 +0800

> Setup : 
> Slony 1 master, 1 slave - pg8.2.5, slony 1.12
> pgpool - 2.01
> OS : centos 4
> Goal : SLony for replication
> Pgpool for load balancing across multiple slaves+1master
...
> listen_addresses = '*'
> port = 9999
> replication_mode = true

If you use Slony-I, you need to set replication_mode to false.


> load_balance_mode = true
> master_slave_mode = true
> ignore_leading_white_space = true
> backend_host_name = 'pgmaster'
> backend_port = 5432
> weight_master = 0.2
> secondary_backend_host_name = 'pgslave1'
> secondary_backend_port = 5432
> weight_secondary = 0.8

secondary_backend_host_name and secondary_backend_port is for pgpool.
Can you set the following setting?

  replication_mode = false
  master_slave_mode = true
  load_balance_mode = true
  backend_hostname0 = 'pgmaster'
  backend_port0 = 5432
  backend_weight0 = 0.2
  backend_hostname1 = 'pgslave1'
  backend_port1 = 5432
  backend_weight1 = 0.8

Regards,
--
Yoshiyuki Asaba
y-asaba at sraoss.co.jp

> 
> 
> 
> If I were to use replication_mode = false (as in the docs) then all the
> select queries will only hit the master DB and there's no note on the
> debug logs saying "load balance on 1", "load balance on 0" or something
> like that.
> 
> I've tried to use
> 
> backend_hostname0
> backend_hostname1
> backend_port0
> backend_port1
> etc also to no avail.
> 
> I don't have pcp_* command as it's not included in the rpms
> 
> I've googled and search through a _lot_ of archives and lists but found
> no clue as to what is happening.
> 
> Would really appreciate some help help..
> 
> 
> As of right now, the working config will give me 1 master + 1 slave in
> load balance mode and ONLY if I put in replication_mode = true
> 
> Thanks.
> _______________________________________________
> Pgpool-general mailing list
> Pgpool-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgpool-general


More information about the Pgpool-general mailing list