[pgpool-general: 4213] Re: Working wiht pgpool and one master and one slave

Tatsuo Ishii ishii at postgresql.org
Tue Nov 17 07:25:06 JST 2015


> Hello,
> 
> Could you help me?
> 
> I have one master and one slave in my environment. I configured my
> pgpool.conf such as below:
> 
> listen_addresses = '*'
> 
> port = 9999
> 
> backend_hostname0 = master'
> backend_port0 = 5432
> backend_weight0 = 0
> backend_data_directory0 = '/tmp/data/'
> 
> backend_hostname1 = 'slave'
> backend_port1 = 5432
> backend_weight1 = 1
> backend_data_directory1 = '/tmp/data'
> 
> load_balance_mode = on
> 
> My target is: SELECT queries should be sent to the slave server and another
> operations to the master server.
> 
> How I can simulated connections to the slave server?

You should set:

backend_weight0 = 0
backend_weight1 = 1

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list