[Pgpool-general] Pgpool-II and Slony-I

Tatsuo Ishii ishii at sraoss.co.jp
Wed Aug 27 08:25:34 UTC 2008


> Hi people,
> 
> We have a setup using Slony-I that currently consists of 1 origin server with 2 subscribers.  I'd like to use pgpool to manage connections in Master/Slave Mode, however looking at the docs (http://pgpool.projects.postgresql.org/) theres not that much info on this.
> 
> The docs state:
> 
> "This mode is for using pgpool-II with another master/slave replication software (like Slony-I), so it really does the actual data replication. DB nodes' information must be set as the replication mode. In addtion to that, set master_slave_mode and load_balance_mode to true."
> 
> And I'm afraid I just can't get my head around exactly what I'm supposed to do from that, I could do with a little more verbose instruction.
> 
> I've tried pgpool, and just set it up in Connection Pool Mode and it works well.  I guess we could just use it in this mode, then in the case we move our set or failover we just repoint the pool.  However, the Master/Slave Mode sounds very interesting.
> 
> Is there anywhere I can get better info on setting up this mode?

Sorry for the poor documentations. Actually the settings for using
master/slave mode is surprisingly simple. If you are running Slony
master on host foo port 5432 and a slave on host bar port 5433, the
settings for pgpool.conf would look something like:

backend_hostname0 = 'foo'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/usr/local/pgsql/data'
backend_hostname1 = 'bar'
backend_port1 = 5433
backend_weight1 = 1
backend_data_directory1 = '/usr/local/pgsql/data'

replication_mode = false
master_slave_mode = true
load_balance_mode = true

In the master/slave mode, pgpool will throw all DMLs to master
only. SELECTs will be thrown to master and slave.

Hope this helps,
--
Tatsuo Ishii
SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list