<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 3:59 AM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Long time ago I proposed this:<br>
<span class=""><br>
&gt; Here is a proposal for upcoming pgpool-II 3.5.<br>
&gt;<br>
&gt; The problem:<br>
&gt; Currently pgpool-II connects to all the DB nodes registered in<br>
&gt; pgpool.conf when client session initiates. However this may cause<br>
&gt; certain inconvenience, especially using CREATE DATABASE command under<br>
&gt; master/slave mode (including streaming replication mode). Suppose<br>
&gt; there are two DB nodes, 0 is primary and 1 is standby. If a user<br>
&gt; issues CREATE DATABASE and exits the session, then connects to the<br>
&gt; newly created database, pgpool-II could fail to connect to node 1<br>
&gt; since the new database might not be created on node 1 yet.<br>
&gt;<br>
&gt; Proposal:<br>
&gt; In certain condition (I suppose load balancing is turned off), let<br>
&gt; pgpool-II only connects to primary node only. This will avoid the<br>
&gt; problem above since pgpool-II does not need to wait for newly created<br>
&gt; database is ready once CREATE DATABASE is done.<br>
<br>
</span>After thinking more, I think this problem not worth to attack since<br>
the use case (load balancing is off) is too narrow, and I would like<br>
to withdraw the proposal. Comments?<br></blockquote><div><br></div><div>I totally agree with you on this, It&#39;s not worth an effort to solve this very rare scenario.</div><div>Although I don&#39;t have any idea on how to do it, but I think instead we should somehow try to</div><div>tackle the replication lag as a whole.  Which includes this above mentioned scenario and also </div><div>the cases like when user does not starts the explicit transaction and the writing query is immediately</div><div>followed by the select on the same table and it gets load balanced and returns the old data.</div><div>But again, I don&#39;t have any idea on how to implement it or attack this problem :-(</div><div><br></div><div>Best Regards</div><div>Muhammad Usama</div><div><br></div><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"><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_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
_______________________________________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</div></div></blockquote></div><br></div></div>