<div dir="ltr"><div>I have just cut out some parts of the log, as it generates mbs of logs a minute as I believe this is what you want, as you can see it doesn't seem to be caching:</div><div><br></div>2013-12-04 07:02:19 LOG:   pid 17148: DB node id: 0 backend pid: 6475 statement: SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = 'table' AND c.relpersistence = 'u'<br>
<div>2013-12-04 07:02:19 LOG:   pid 17173: DB node id: 0 backend pid: 6463 statement: SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = 'table' AND c.relpersistence = 'u'<br></div><div>2013-12-04 07:02:19 LOG:   pid 17179: DB node id: 0 backend pid: 6462 statement: SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = 'table' AND c.relpersistence = 'u'<br>
</div><div><br></div><div>let me know if this is not what you wanted, we are currently using pgpool: 3.3.0 with postgres 9.1</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(34,34,34)"><b>Nathan Brennan</b> </span><span style="color:rgb(34,34,34)"><i>BCS</i></span><div><span style="color:rgb(34,34,34)">Lead Developer</span></div><div><br></div><div><b>T:</b> <a value="+61894823986" style="color:rgb(17,85,204)">+61 8 9482 3981</a> | <b>E:</b> <a href="mailto:nathan@healthengine.com.au" style="color:rgb(17,85,204)" target="_blank">nathan@healthengine.com.au</a><div>
<div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)"><a href="http://healthengine.com.au/" style="color:rgb(17,85,204)" target="_blank"><img src="http://healthengine.com.au/images/emailsig-helogo.png"></a>     <a href="https://twitter.com/healthengine" style="color:rgb(17,85,204)" target="_blank"><img src="http://healthengine.com.au/images/emailsig-twitter.png"></a>  <a href="https://www.facebook.com/HealthEngine" style="color:rgb(17,85,204)" target="_blank"><img src="http://healthengine.com.au/images/emailsig-facebook.png"></a><br>
</div></div></div><div style="color:rgb(34,34,34)"><br></div><div style="color:rgb(34,34,34)"><img src="http://healthengine.com.au/images/emailsig-no1.png"></div></div></div></div>
<br><br><div class="gmail_quote">On Wed, Dec 4, 2013 at 2:40 PM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> ok thanks,<br>
><br>
> I have disabled the check_temp_table as we don't use temp tables which<br>
> removes the pg_temp queries, however there is still alot of queries for<br>
> SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = 'table' AND<br>
> c.relpersistence = 'u' to me this seems like a check to see if the table<br>
> exists, is there a way to cache this ?<br>
<br>
</div>I thought this one is cached. Can you show me pgpool.log with<br>
log_per_node_statement enabled?<br>
<div class="im">--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
</div>> *Nathan Brennan* *BCS*<br>
> Lead Developer<br>
><br>
> *T:* <a href="tel:%2B61%208%209482%203981" value="+61894823981">+61 8 9482 3981</a> | *E:* <a href="mailto:nathan@healthengine.com.au">nathan@healthengine.com.au</a><br>
><br>
> <<a href="http://healthengine.com.au/" target="_blank">http://healthengine.com.au/</a>>      <<a href="https://twitter.com/healthengine" target="_blank">https://twitter.com/healthengine</a>><br>
> <<a href="https://www.facebook.com/HealthEngine" target="_blank">https://www.facebook.com/HealthEngine</a>><br>
<div class="HOEnZb"><div class="h5">><br>
><br>
><br>
> On Wed, Dec 4, 2013 at 12:51 PM, Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>> wrote:<br>
><br>
>> > Hi,<br>
>> ><br>
>> > Is there a way to cache these queries or turn them off as pgpool is doing<br>
>> > thousands of them a second.I tried setting relcache_expire=60 but it<br>
>> > doesn't seem to help.<br>
>> ><br>
>> > example queries:<br>
>> ><br>
>> > SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname =<br>
>> > 'table' AND c.relnamespace = n.oid AND n.nspname = 'pg_catalog'<br>
>> >  SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname =<br>
>> > 'table' AND c.relnamespace = n.oid AND n.nspname ~ '^pg_temp_'<br>
>><br>
>> You can avoid temp table related queries by turning check_temp_table<br>
>> to off (of course you need to be sure that you are not using temp<br>
>> tables).<br>
>><br>
>> Also relcache_expire = 0 will be more effective if you want to reduce<br>
>> the number of queries.<br>
>> --<br>
>> Tatsuo Ishii<br>
>> SRA OSS, Inc. Japan<br>
>> English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
>> Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
>><br>
</div></div></blockquote></div><br></div>