<div dir="ltr">Thanks so much Tatsuo..<div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">For USA Pgpool-II:<br>
backend_hostname0 = &#39;<a href="http://usasever.com" rel="noreferrer" target="_blank">usasever.com</a>&#39;<br>
backend_weight0 = 1<br>
backend_hostname1 = &#39;<a href="http://asiasever.com" rel="noreferrer" target="_blank">asiasever.com</a>&#39;<br>
backend_weight1 = 0<br>
<br>
For Asia Pgpool-II:<br>
backend_hostname0 = &#39;<a href="http://usasever.com" rel="noreferrer" target="_blank">usasever.com</a>&#39;<br>
backend_weight0 = 0<br>
backend_hostname1 = &#39;<a href="http://asiasever.com" rel="noreferrer" target="_blank">asiasever.com</a>&#39;<br>
backend_weight1 = 1<br>
<br>
Notice the difference of weight0/1 parameter between USA and Aisa<br>
Pgpool-II.<br></blockquote><div><br></div><div><br></div><div>I have two webservers, one in the USA and one in Asia.</div><div><br></div><div><div>I won&#39;t be able to use virtual ip&#39;s (delegate_IP)</div></div><div><br></div><div>In this situation does my Asian webserver connect to the Asian/slave pgpool-II or the USA/master one?<br></div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Cheers</div><div><br></div><div>Jon</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
This way, all read/write access will be sent to <a href="http://usasever.com" rel="noreferrer" target="_blank">usasever.com</a> via USA<br>
Pgpool-II. While all read access will be sent to <a href="http://asiaserver.com" rel="noreferrer" target="_blank">asiaserver.com</a> and<br>
all write access will be sent to <a href="http://usaserver.com" rel="noreferrer" target="_blank">usaserver.com</a> via Asia Pgpool-II.<br>
<br>
Problem is, Pgpool-II generates internal queries to the master server<br>
(in your case <a href="http://usaserver.com" rel="noreferrer" target="_blank">usaserver.com</a>). This happens when Pgpool-II needs to<br>
make sure that particular table is not temporary table for<br>
example. This is not a problem for USA Pgpool-II because it sends all<br>
queries to <a href="http://usaserver.com" rel="noreferrer" target="_blank">usaserver.com</a> anyway.<br>
<br>
However, this is a problem for Asia Pgpool-II, because it sends queries<br>
to USA server across the ocean, which may be slow.  If you are sure<br>
that you are not using temp tables, you can disable the query by<br>
setting &quot;check_temp_table = off&quot;. Same thing can be said to<br>
&quot;check_unlogged_table&quot;.<br>
<br>
Also Pgpool-II keeps internal cache to reduce issuing such that<br>
queries. If you access many tables you might want to increase<br>
&quot;relcache_size&quot;.<br>
<br>
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_<wbr>en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
<span class="gmail-"><br>
&gt; Hi,<br>
&gt;<br>
&gt; New to the list and have been busy setting up pgpool-ii this last week or<br>
&gt; two.<br>
&gt;<br>
&gt; I&#39;ve previously used drbd/slony for replication but pgpool looked like a<br>
&gt; good choice, so i&#39;m trying it!<br>
&gt;<br>
&gt; I am wondering if it is possible to have pgpool-ii run across servers far<br>
&gt; apart (different countries):<br>
&gt;<br>
&gt; I have postgresql streaming replication working, from my USA to my Asia<br>
&gt; server and it seems ok.<br>
&gt;<br>
&gt; However i want pgpool to be used to automatically send reads to the Asia<br>
&gt; server and writes to the USA server for users in Asia.<br>
&gt;<br>
&gt; Ideally I want:<br>
&gt; - Master in the USA with pgpool-ii - with a webserver that will serve most<br>
&gt; of the world, reads/writes are local<br>
&gt; - Slave in Asia with pgpool-ii - wtih a webserver that will server reads<br>
&gt; from Asia/Slave and send writes to the Master<br>
&gt; - Both servers only have public ip&#39;s<br>
&gt; - For the Master/USA server, i&#39;m happy for all reads/writes to go to the<br>
&gt; Master.<br>
&gt; - For the Slave/Asia server I would like pgpool-ii to proxy database<br>
&gt; requests - sending writes to the USA server and doing reads from the Asia<br>
&gt; server....<br>
&gt;<br>
</span>&gt; *In this situation I don&#39;t think i need a &#39;virtual ip&#39; (i&#39;m not trying to<br>
&gt; load balance USA requests). Is this correct?*<br>
<div class="gmail-HOEnZb"><div class="gmail-h5">&gt;<br>
&gt; Is this setup even possible?<br>
&gt;<br>
&gt; Thanks in advance.<br>
&gt;<br>
&gt; Jon<br>
</div></div></blockquote></div><br></div></div></div>