<div dir="ltr"><div>Complemented ...<br></div><div>When I related hl.p_h_lineitem = lli.p_h_lineitem this message is displayed.<br><br></div><div>Attached my pgpool.conf and insert to the rules script.<br><br></div><div><br></div><div>Thanks again.<br></div><div><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-26 15:39 GMT-02:00 Andre Eduardo Bento Garcia <span dir="ltr">&lt;<a href="mailto:andreedugarcia@gmail.com" target="_blank">andreedugarcia@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Friends,  <div>I am using pgpool-II  3.4, postgres 9.3 and ubuntu 14.4.<div>I implemented a query parallel in two nodes with the same configuration but diferent hardware.</div></div><div>I run query into distribuited tables (3 milion lines each node)</div><div>The tables (l_lineitem, h_lineitem) are distribuited.<br></div><div>The tables (h_orders, h_supplier) are replicated.<br></div><div><br>My pgpool.conf is configured parallel_mode = on and replicate_mode = on and load_balance = false<br></div><div><br>Of course:<br>I inserted on pgpool_catalog.dist_def and pgpool_catalog.replicate_def <br>I created a function for each rule table like pgpool_catalog.dist_def_h_lineitem and pgpool_catalog.dist_def_l_lineitem<br></div><div>I specified a rule: if the value of pk for each table is less than 3000000 goes to the node 1 else goes to the node 0.<br><br>So when I run a simple query from port 9999, I get results ok.</div><div><br></div><div><div><div style="font-size:13px"><div>bench_parallel=#
 select count(0) from l_lineitem lli, h_orders ho, h_supplier hs where  
 lli.p_h_orderkey = ho.p_h_orderkey and lli.p_h_suppkey = hs.p_h_suppkey
  ;</div><div>  count  </div><div>---------</div><div> 6001215</div><div>(1 registro)</div><div><br></div></div><div style="font-size:13px"></div><div style="font-size:13px"></div><div style="font-size:13px">bench_parallel=# select count(0) from l_lineitem lli, h_lineitem hli where lli.p_h_lineitem = hli.p_h_lineitem  ;  </div><div style="font-size:13px">count  </div><div style="font-size:13px">---------</div><div style="font-size:13px"> 6001215</div><div style="font-size:13px">(1 registro)</div></div></div><div><br></div><div><br></div><div>So wnen I run a little complex query I received this message :</div><div><br></div><div style="font-size:13px"><br></div><div style="font-size:13px">bench_parallel=#
 select count(0) from h_lineitem hl,l_lineitem lli, h_orders ho, 
h_supplier hs where   lli.p_h_orderkey = ho.p_h_orderkey and 
lli.p_h_suppkey = hs.p_h_suppkey  and hl.p_h_lineitem =lli.p_h_lineitem;<br><br></div><div style="font-size:13px">ERROR:  pgpool2 sql restriction(notice from dblink)<br><br></div><div style="font-size:13px">DETALHE:
   SELECT count(0) AS count FROM dblink(&#39;host=andre-ubuntu-01 
dbname=bench_parallel port=9999 user=postgres&#39;,&#39;SELECT 
pool_parallel(&quot;SELECT hl.p_h_lineitem FROM h_lineitem AS hl WHERE  ( 
(TRUE AND TRUE) AND TRUE)&quot;)&#39;,false) AS hl(&quot;pool_c$0&quot; integer),dblink(&#39;</div><div style="font-size:13px"><br></div><div style="font-size:13px">Its seems that the table (l_lineitem) doesn&#39;t accept to relate on the more than four. I was thinking that it was my problem, but the relationship works individually.  <br></div><div style="font-size:13px"></div><div style="font-size:13px"><br></div><div style="font-size:13px">I read at this mailinglist and I found this topic about restriction complex query (<a href="http://www.sraoss.jp/pipermail/pgpool-general/2013-November/002312.html" target="_blank">http://www.sraoss.jp/pipermail/pgpool-general/2013-November/002312.html</a>)<br><br></div><div style="font-size:13px"><br></div><div style="font-size:13px">So I need your help.<br><br><br></div></div>
</blockquote></div><br></div>