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

Tatsuo Ishii ishii at sraoss.co.jp
Thu Aug 28 01:18:01 UTC 2008


> > 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.
> > 
> 
> Does it presume that hostname0 is the master?

Yes.

> Is there a way to make it throw SELECTS only to the slave/s.

backend_weight0 = 0

should do what you want.
--
Tatsuo Ishii
SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list