<div dir="ltr">Hi<div><br></div><div>I have found the problem, It was because of the buffer for storing table oids was created in wrong memory context.</div><div>I have pushed the fix for it in master and 3_4 stable branches.</div><div><br></div><div>Thanks</div><div>Best regards</div><div>Muhammad Usama</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 22, 2015 at 2:09 PM, 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">Thanks for the report.<br>
<br>
I confirm this with pgpool-II 3.4.1. I also found that this does not<br>
happen with 3.3.5 (I tested with shmem).<br>
<br>
Here is the test script.<br>
-------------------------------------<br>
drop table t1;<br>
create table t1(i int, j text);<br>
insert into t1 values(1, &#39;aaa&#39;);<br>
select * from t1;<br>
select * from t1;<br>
update t1 set j = &#39;bbb&#39; where i = 1;<br>
select * from t1;<br>
-------------------------------------<br>
<br>
Will look into this...<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" 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>
<div class="HOEnZb"><div class="h5"><br>
&gt; Looks like only part of this email ended up in the mailing list , not<br>
&gt; sure how. Resending again - hope it works this time.<br>
&gt;<br>
&gt; pgpool doesn&#39;t seem to be invalidating caches properly. See the<br>
&gt; example test case below<br>
&gt;<br>
&gt; psql -U ruser -d mydb -h 127.0.0.1 -p 9999<br>
&gt; Password for user ruser:<br>
&gt; psql (9.4.1)<br>
&gt; Type &quot;help&quot; for help.<br>
&gt;<br>
&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;  comments<br>
&gt; ----------<br>
&gt;  boooo<br>
&gt; (1 row)<br>
&gt;<br>
&gt; # comes from cache<br>
&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;  comments<br>
&gt; ----------<br>
&gt;  boooo<br>
&gt; (1 row)<br>
&gt;<br>
&gt; # works<br>
&gt; mydb=&gt; update users set comments=&#39;hello&#39; where id=1;<br>
&gt; UPDATE 1<br>
&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;  comments<br>
&gt; ----------<br>
&gt;  hello<br>
&gt; (1 row)<br>
&gt;<br>
&gt; # stale<br>
&gt; mydb=&gt; update users set comments=&#39;hello world&#39; where id=1;<br>
&gt; UPDATE 1<br>
&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;  comments<br>
&gt; ----------<br>
&gt;  hello<br>
&gt; (1 row)<br>
&gt;<br>
&gt; # also stale<br>
&gt; mydb=&gt; update users set comments=&#39;booo&#39; where id=1;<br>
&gt; UPDATE 1<br>
&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;  comments<br>
&gt; ----------<br>
&gt;  hello<br>
&gt; (1 row)<br>
&gt;<br>
&gt;<br>
&gt; From the second write onwards, the cache is not invalidated and stale<br>
&gt; value is being served. Is it a bug or am I doing something wrong? This<br>
&gt; happens with both cache backends (memcache and shmem but test logs are<br>
&gt; from memcache backend)<br>
&gt;<br>
&gt; Test setup is postgresql-9.4 and memcached 1.4.21 and pgpool-3.4.2. my<br>
&gt; configs and logs from test are here<br>
&gt;<br>
&gt; <a href="https://gist.github.com/dbalan/d635993a3e532a083751" target="_blank">https://gist.github.com/dbalan/d635993a3e532a083751</a><br>
&gt;<br>
&gt; Regards,<br>
&gt; --------<br>
&gt; DHANANJAY | Infrastructure Engineer<br>
&gt; Plivo, Inc. 340 Pine St, San Francisco - 94104, USA<br>
&gt; Web: <a href="http://www.plivo.com" target="_blank">www.plivo.com</a> | Twitter: @plivo, @notmycommit<br>
&gt; DHANANJAY | Infrastructure Engineer<br>
&gt; Plivo, Inc. 340 Pine St, San Francisco - 94104, USA<br>
&gt; Web: <a href="http://www.plivo.com" target="_blank">www.plivo.com</a> | Twitter: @plivo, @notmycommit<br>
&gt;<br>
&gt; Free Incoming SMS for All US Short Codes – Get One Today!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Apr 21, 2015 at 12:33 PM, Dhananjay Balan &lt;<a href="mailto:dhananjay@plivo.com">dhananjay@plivo.com</a>&gt; wrote:<br>
&gt;&gt; pgpool doesn&#39;t seem to be invalidating caches properly. See the<br>
&gt;&gt; example test case below<br>
&gt;&gt;<br>
&gt;&gt; psql -U ruser -d mydb -h 127.0.0.1 -p 9999<br>
&gt;&gt; Password for user ruser:<br>
&gt;&gt; psql (9.4.1)<br>
&gt;&gt; Type &quot;help&quot; for help.<br>
&gt;&gt;<br>
&gt;&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;&gt;  comments<br>
&gt;&gt; ----------<br>
&gt;&gt;  boooo<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt; # comes from cache<br>
&gt;&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;&gt;  comments<br>
&gt;&gt; ----------<br>
&gt;&gt;  boooo<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt; # works<br>
&gt;&gt; mydb=&gt; update users set comments=&#39;hello&#39; where id=1;<br>
&gt;&gt; UPDATE 1<br>
&gt;&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;&gt;  comments<br>
&gt;&gt; ----------<br>
&gt;&gt;  hello<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt; # stale<br>
&gt;&gt; mydb=&gt; update users set comments=&#39;hello world&#39; where id=1;<br>
&gt;&gt; UPDATE 1<br>
&gt;&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;&gt;  comments<br>
&gt;&gt; ----------<br>
&gt;&gt;  hello<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt; # also stale<br>
&gt;&gt; mydb=&gt; update users set comments=&#39;booo&#39; where id=1;<br>
&gt;&gt; UPDATE 1<br>
&gt;&gt; mydb=&gt; select comments from users where id=1;<br>
&gt;&gt;  comments<br>
&gt;&gt; ----------<br>
&gt;&gt;  hello<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; From the second write onwards, the cache is not invalidated and stale<br>
&gt;&gt; value is being served. Is it a bug or am I doing something wrong? This<br>
&gt;&gt; happens with both cache backends (memcache and shmem but test logs are<br>
&gt;&gt; from memcache backend)<br>
&gt;&gt;<br>
&gt;&gt; Test setup is postgresql-9.4 and memcached 1.4.21 and pgpool-3.4.2. my<br>
&gt;&gt; configs and logs from test are here<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://gist.github.com/dbalan/d635993a3e532a083751" target="_blank">https://gist.github.com/dbalan/d635993a3e532a083751</a><br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; --------<br>
&gt;&gt; DHANANJAY | Infrastructure Engineer<br>
&gt;&gt; Plivo, Inc. 340 Pine St, San Francisco - 94104, USA<br>
&gt;&gt; Web: <a href="http://www.plivo.com" target="_blank">www.plivo.com</a> | Twitter: @plivo, @notmycommit<br>
&gt; _______________________________________________<br>
&gt; pgpool-general mailing list<br>
&gt; <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</div></div></blockquote></div><br></div></div>