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

JotaComm jota.comm at gmail.com
Wed Nov 18 22:25:45 JST 2015


Hello,



2015-11-17 20:54 GMT-02:00 Tatsuo Ishii <ishii at postgresql.org>:

> > Hello,
> >
> >
> >
> > 2015-11-16 20:25 GMT-02:00 Tatsuo Ishii <ishii at postgresql.org>:
> >
> >> > 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
> >>
> >
> > ​Thanks for answering, but unfortunately I couldn't simulate these
> > operations using psql. Is it possible to simulate this situation using
> psql
> > client?​
>
> Can you please elaborate more? I don't understand what is the objective
> of "simulate". If you want to make sure that SELECT queries go to
> slave server, you could look at the PostgreSQL statement log at the
> slave server. I'm confused.
>
> ​It's OK now. Thanks for your tip. The SELECT queries is going to slave. ​



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


​Best regards​

-- 
JotaComm
http://jotacomm.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20151118/fef7ac4e/attachment.html>


More information about the pgpool-general mailing list