<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:x-small">Hello,<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-17 20:54 GMT-02:00 Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">&gt; Hello,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2015-11-16 20:25 GMT-02:00 Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt;:<br>
&gt;<br>
&gt;&gt; &gt; Hello,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Could you help me?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have one master and one slave in my environment. I configured my<br>
&gt;&gt; &gt; pgpool.conf such as below:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; listen_addresses = &#39;*&#39;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; port = 9999<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; backend_hostname0 = master&#39;<br>
&gt;&gt; &gt; backend_port0 = 5432<br>
&gt;&gt; &gt; backend_weight0 = 0<br>
&gt;&gt; &gt; backend_data_directory0 = &#39;/tmp/data/&#39;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; backend_hostname1 = &#39;slave&#39;<br>
&gt;&gt; &gt; backend_port1 = 5432<br>
&gt;&gt; &gt; backend_weight1 = 1<br>
&gt;&gt; &gt; backend_data_directory1 = &#39;/tmp/data&#39;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; load_balance_mode = on<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; My target is: SELECT queries should be sent to the slave server and<br>
&gt;&gt; another<br>
&gt;&gt; &gt; operations to the master server.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; How I can simulated connections to the slave server?<br>
&gt;&gt;<br>
&gt;&gt; You should set:<br>
&gt;&gt;<br>
&gt;&gt; backend_weight0 = 0<br>
&gt;&gt; backend_weight1 = 1<br>
&gt;&gt;<br>
&gt;<br>
&gt; ​Thanks for answering, but unfortunately I couldn&#39;t simulate these<br>
&gt; operations using psql. Is it possible to simulate this situation using psql<br>
&gt; client?​<br>
<br>
</div></div>Can you please elaborate more? I don&#39;t understand what is the objective<br>
of &quot;simulate&quot;. If you want to make sure that SELECT queries go to<br>
slave server, you could look at the PostgreSQL statement log at the<br>
slave server. I&#39;m confused.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:x-small">​It&#39;s OK now. Thanks for your tip. The SELECT queries is going to slave. ​</div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</div></div></blockquote></div><br><br clear="all"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:x-small">​Best regards​</div><br>-- <br><div class="gmail_signature">JotaComm<br><a href="http://jotacomm.wordpress.com" target="_blank">http://jotacomm.wordpress.com</a></div>
</div></div>