<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"><<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">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, 'aaa');<br>
select * from t1;<br>
select * from t1;<br>
update t1 set j = 'bbb' 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>
> Looks like only part of this email ended up in the mailing list , not<br>
> sure how. Resending again - hope it works this time.<br>
><br>
> pgpool doesn't seem to be invalidating caches properly. See the<br>
> example test case below<br>
><br>
> psql -U ruser -d mydb -h 127.0.0.1 -p 9999<br>
> Password for user ruser:<br>
> psql (9.4.1)<br>
> Type "help" for help.<br>
><br>
> mydb=> select comments from users where id=1;<br>
>  comments<br>
> ----------<br>
>  boooo<br>
> (1 row)<br>
><br>
> # comes from cache<br>
> mydb=> select comments from users where id=1;<br>
>  comments<br>
> ----------<br>
>  boooo<br>
> (1 row)<br>
><br>
> # works<br>
> mydb=> update users set comments='hello' where id=1;<br>
> UPDATE 1<br>
> mydb=> select comments from users where id=1;<br>
>  comments<br>
> ----------<br>
>  hello<br>
> (1 row)<br>
><br>
> # stale<br>
> mydb=> update users set comments='hello world' where id=1;<br>
> UPDATE 1<br>
> mydb=> select comments from users where id=1;<br>
>  comments<br>
> ----------<br>
>  hello<br>
> (1 row)<br>
><br>
> # also stale<br>
> mydb=> update users set comments='booo' where id=1;<br>
> UPDATE 1<br>
> mydb=> select comments from users where id=1;<br>
>  comments<br>
> ----------<br>
>  hello<br>
> (1 row)<br>
><br>
><br>
> From the second write onwards, the cache is not invalidated and stale<br>
> value is being served. Is it a bug or am I doing something wrong? This<br>
> happens with both cache backends (memcache and shmem but test logs are<br>
> from memcache backend)<br>
><br>
> Test setup is postgresql-9.4 and memcached 1.4.21 and pgpool-3.4.2. my<br>
> configs and logs from test are here<br>
><br>
> <a href="https://gist.github.com/dbalan/d635993a3e532a083751" target="_blank">https://gist.github.com/dbalan/d635993a3e532a083751</a><br>
><br>
> Regards,<br>
> --------<br>
> DHANANJAY | Infrastructure Engineer<br>
> Plivo, Inc. 340 Pine St, San Francisco - 94104, USA<br>
> Web: <a href="http://www.plivo.com" target="_blank">www.plivo.com</a> | Twitter: @plivo, @notmycommit<br>
> DHANANJAY | Infrastructure Engineer<br>
> Plivo, Inc. 340 Pine St, San Francisco - 94104, USA<br>
> Web: <a href="http://www.plivo.com" target="_blank">www.plivo.com</a> | Twitter: @plivo, @notmycommit<br>
><br>
> Free Incoming SMS for All US Short Codes – Get One Today!<br>
><br>
><br>
><br>
><br>
> On Tue, Apr 21, 2015 at 12:33 PM, Dhananjay Balan <<a href="mailto:dhananjay@plivo.com">dhananjay@plivo.com</a>> wrote:<br>
>> pgpool doesn't seem to be invalidating caches properly. See the<br>
>> example test case below<br>
>><br>
>> psql -U ruser -d mydb -h 127.0.0.1 -p 9999<br>
>> Password for user ruser:<br>
>> psql (9.4.1)<br>
>> Type "help" for help.<br>
>><br>
>> mydb=> select comments from users where id=1;<br>
>>  comments<br>
>> ----------<br>
>>  boooo<br>
>> (1 row)<br>
>><br>
>> # comes from cache<br>
>> mydb=> select comments from users where id=1;<br>
>>  comments<br>
>> ----------<br>
>>  boooo<br>
>> (1 row)<br>
>><br>
>> # works<br>
>> mydb=> update users set comments='hello' where id=1;<br>
>> UPDATE 1<br>
>> mydb=> select comments from users where id=1;<br>
>>  comments<br>
>> ----------<br>
>>  hello<br>
>> (1 row)<br>
>><br>
>> # stale<br>
>> mydb=> update users set comments='hello world' where id=1;<br>
>> UPDATE 1<br>
>> mydb=> select comments from users where id=1;<br>
>>  comments<br>
>> ----------<br>
>>  hello<br>
>> (1 row)<br>
>><br>
>> # also stale<br>
>> mydb=> update users set comments='booo' where id=1;<br>
>> UPDATE 1<br>
>> mydb=> select comments from users where id=1;<br>
>>  comments<br>
>> ----------<br>
>>  hello<br>
>> (1 row)<br>
>><br>
>><br>
>> From the second write onwards, the cache is not invalidated and stale<br>
>> value is being served. Is it a bug or am I doing something wrong? This<br>
>> happens with both cache backends (memcache and shmem but test logs are<br>
>> from memcache backend)<br>
>><br>
>> Test setup is postgresql-9.4 and memcached 1.4.21 and pgpool-3.4.2. my<br>
>> configs and logs from test are here<br>
>><br>
>> <a href="https://gist.github.com/dbalan/d635993a3e532a083751" target="_blank">https://gist.github.com/dbalan/d635993a3e532a083751</a><br>
>><br>
>> Regards,<br>
>> --------<br>
>> DHANANJAY | Infrastructure Engineer<br>
>> Plivo, Inc. 340 Pine St, San Francisco - 94104, USA<br>
>> Web: <a href="http://www.plivo.com" target="_blank">www.plivo.com</a> | Twitter: @plivo, @notmycommit<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>
_______________________________________________<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>