<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 = '<a href="http://usasever.com" rel="noreferrer" target="_blank">usasever.com</a>'<br>
backend_weight0 = 1<br>
backend_hostname1 = '<a href="http://asiasever.com" rel="noreferrer" target="_blank">asiasever.com</a>'<br>
backend_weight1 = 0<br>
<br>
For Asia Pgpool-II:<br>
backend_hostname0 = '<a href="http://usasever.com" rel="noreferrer" target="_blank">usasever.com</a>'<br>
backend_weight0 = 0<br>
backend_hostname1 = '<a href="http://asiasever.com" rel="noreferrer" target="_blank">asiasever.com</a>'<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't be able to use virtual ip'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 "check_temp_table = off". Same thing can be said to<br>
"check_unlogged_table".<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>
"relcache_size".<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>
> Hi,<br>
><br>
> New to the list and have been busy setting up pgpool-ii this last week or<br>
> two.<br>
><br>
> I've previously used drbd/slony for replication but pgpool looked like a<br>
> good choice, so i'm trying it!<br>
><br>
> I am wondering if it is possible to have pgpool-ii run across servers far<br>
> apart (different countries):<br>
><br>
> I have postgresql streaming replication working, from my USA to my Asia<br>
> server and it seems ok.<br>
><br>
> However i want pgpool to be used to automatically send reads to the Asia<br>
> server and writes to the USA server for users in Asia.<br>
><br>
> Ideally I want:<br>
> - Master in the USA with pgpool-ii - with a webserver that will serve most<br>
> of the world, reads/writes are local<br>
> - Slave in Asia with pgpool-ii - wtih a webserver that will server reads<br>
> from Asia/Slave and send writes to the Master<br>
> - Both servers only have public ip's<br>
> - For the Master/USA server, i'm happy for all reads/writes to go to the<br>
> Master.<br>
> - For the Slave/Asia server I would like pgpool-ii to proxy database<br>
> requests - sending writes to the USA server and doing reads from the Asia<br>
> server....<br>
><br>
</span>> *In this situation I don't think i need a 'virtual ip' (i'm not trying to<br>
> load balance USA requests). Is this correct?*<br>
<div class="gmail-HOEnZb"><div class="gmail-h5">><br>
> Is this setup even possible?<br>
><br>
> Thanks in advance.<br>
><br>
> Jon<br>
</div></div></blockquote></div><br></div></div></div>