No subject


Fri Jan 30 20:15:43 JST 2015


# First, read and update data - invalidates cache - this works fine.
psql -U ruser -d mydb -h 127.0.0.1 -p 9999
Password for user ruser:
psql (9.4.1)
Type "help" for help.

mydb=3D> select comments from users where id=3D1;
    comments
----------------
 boot me please
(1 row)

mydb=3D> update users set comments=3D'hello' where id=3D1;
UPDATE 1
mydb=3D> select comments from users where id=3D1;
 comments
----------
 hello
(1 row)

mydb=3D>


Second pgpool:
# Connects via second deamon, reads stale data, i/e updates from this
pgpool instance never invalidate cache.
=CE=BB ~/ psql -U ruser -d mydb -h 127.0.0.1 -p 9988
Password for user ruser:
psql (9.4.1)
Type "help" for help.

mydb=3D> select comments from users where id=3D1;
 comments
----------
 hello
(1 row)

mydb=3D> update users set comments=3D'hello world' where id=3D1;
UPDATE 1
mydb=3D> select comments from users where id=3D1;
 comments
----------
 hello
(1 row)

mydb=3D>


The configs and full logs are attached in the link, They both are same
except for the directory paths and ports - not sure whats going wrong here.


*DHANANJAY *| Infrastructure Engineer
Plivo, Inc. 340 Pine St, San Francisco - 94104, USA
Web: www.plivo.com | Twitter: @plivo <http://twitter.com/plivo>,
@notmycommit <https://twitter.com/notmycommit>

Free Incoming SMS for All US Short Codes =E2=80=93 Get One Today!
<https://www.plivo.com/sms-short-code/?utm=3Demailsig>=EF=BB=BF

On Mon, Apr 27, 2015 at 5:29 PM, Dhananjay Balan <dhananjay at plivo.com>
wrote:

> Hi,
>
> This commit seems to have fixed the issue. However cache invalidation whe=
n
> multiple pgpools are used (connecting to same memcache server) is (?)
> broken even with 3.3.5. Here are the logs from 3.3.5
>
> https://gist.github.com/dbalan/c5a93458d5c091c28c71
>
> My test setup is two instances of 3.3.5 running on 9999 and 9988 of same
> machine with memcache running in localhost.
>
> From first pgpool,
>
> # First, read and update data - invalidates cache - this works fine.
> psql -U ruser -d mydb -h 127.0.0.1 -p 9999
> Password for user ruser:
> psql (9.4.1)
> Type "help" for help.
>
> mydb=3D> select comments from users where id=3D1;
>     comments
> ----------------
>  boot me please
> (1 row)
>
> mydb=3D> update users set comments=3D'hello' where id=3D1;
> UPDATE 1
> mydb=3D> select comments from users where id=3D1;
>  comments
> ----------
>  hello
> (1 row)
>
> mydb=3D>
>
>
> Second pgpool:
> # Connects via second deamon, reads stale data, i/e updates from this
> pgpool instance never invalidate cache.
> =CE=BB ~/ psql -U ruser -d mydb -h 127.0.0.1 -p 9988
> Password for user ruser:
> psql (9.4.1)
> Type "help" for help.
>
> mydb=3D> select comments from users where id=3D1;
>  comments
> ----------
>  hello
> (1 row)
>
> mydb=3D> update users set comments=3D'hello world' where id=3D1;
> UPDATE 1
> mydb=3D> select comments from users where id=3D1;
>  comments
> ----------
>  hello
> (1 row)
>
> mydb=3D>
>
>
> The configs and full logs are attached in the link, They both are same
> except for the directory paths and ports - not sure whats going wrong her=
e.
>
> https://gist.github.com/dbalan/c5a93458d5c091c28c71
>
>
>
>
> *DHANANJAY *| Infrastructure Engineer
> Plivo, Inc. 340 Pine St, San Francisco - 94104, USA
> Web: www.plivo.com | Twitter: @plivo <http://twitter.com/plivo>,
> @notmycommit <https://twitter.com/notmycommit>
>
> Free Incoming SMS for All US Short Codes =E2=80=93 Get One Today!
> <https://www.plivo.com/sms-short-code/?utm=3Demailsig>=EF=BB=BF
>
>
>
> On Thu, Apr 23, 2015 at 5:11 PM, Muhammad Usama <m.usama at gmail.com> wrote=
:
>
>> Hi
>>
>> I have found the problem, It was because of the buffer for storing table
>> oids was created in wrong memory context.
>> I have pushed the fix for it in master and 3_4 stable branches.
>>
>> Thanks
>> Best regards
>> Muhammad Usama
>>
>>
>> On Wed, Apr 22, 2015 at 2:09 PM, Tatsuo Ishii <ishii at postgresql.org>
>> wrote:
>>
>>> Thanks for the report.
>>>
>>> I confirm this with pgpool-II 3.4.1. I also found that this does not
>>> happen with 3.3.5 (I tested with shmem).
>>>
>>> Here is the test script.
>>> -------------------------------------
>>> drop table t1;
>>> create table t1(i int, j text);
>>> insert into t1 values(1, 'aaa');
>>> select * from t1;
>>> select * from t1;
>>> update t1 set j =3D 'bbb' where i =3D 1;
>>> select * from t1;
>>> -------------------------------------
>>>
>>> Will look into this...
>>>
>>> Best regards,
>>> --
>>> Tatsuo Ishii
>>> SRA OSS, Inc. Japan
>>> English: http://www.sraoss.co.jp/index_en.php
>>> Japanese:http://www.sraoss.co.jp
>>>
>>> > Looks like only part of this email ended up in the mailing list , not
>>> > sure how. Resending again - hope it works this time.
>>> >
>>> > pgpool doesn't seem to be invalidating caches properly. See the
>>> > example test case below
>>> >
>>> > psql -U ruser -d mydb -h 127.0.0.1 -p 9999
>>> > Password for user ruser:
>>> > psql (9.4.1)
>>> > Type "help" for help.
>>> >
>>> > mydb=3D> select comments from users where id=3D1;
>>> >  comments
>>> > ----------
>>> >  boooo
>>> > (1 row)
>>> >
>>> > # comes from cache
>>> > mydb=3D> select comments from users where id=3D1;
>>> >  comments
>>> > ----------
>>> >  boooo
>>> > (1 row)
>>> >
>>> > # works
>>> > mydb=3D> update users set comments=3D'hello' where id=3D1;
>>> > UPDATE 1
>>> > mydb=3D> select comments from users where id=3D1;
>>> >  comments
>>> > ----------
>>> >  hello
>>> > (1 row)
>>> >
>>> > # stale
>>> > mydb=3D> update users set comments=3D'hello world' where id=3D1;
>>> > UPDATE 1
>>> > mydb=3D> select comments from users where id=3D1;
>>> >  comments
>>> > ----------
>>> >  hello
>>> > (1 row)
>>> >
>>> > # also stale
>>> > mydb=3D> update users set comments=3D'booo' where id=3D1;
>>> > UPDATE 1
>>> > mydb=3D> select comments from users where id=3D1;
>>> >  comments
>>> > ----------
>>> >  hello
>>> > (1 row)
>>> >
>>> >
>>> > From the second write onwards, the cache is not invalidated and stale
>>> > value is being served. Is it a bug or am I doing something wrong? Thi=
s
>>> > happens with both cache backends (memcache and shmem but test logs ar=
e
>>> > from memcache backend)
>>> >
>>> > Test setup is postgresql-9.4 and memcached 1.4.21 and pgpool-3.4.2. m=
y
>>> > configs and logs from test are here
>>> >
>>> > https://gist.github.com/dbalan/d635993a3e532a083751
>>> >
>>> > Regards,
>>> > --------
>>> > DHANANJAY | Infrastructure Engineer
>>> > Plivo, Inc. 340 Pine St, San Francisco - 94104, USA
>>> > Web: www.plivo.com | Twitter: @plivo, @notmycommit
>>> > DHANANJAY | Infrastructure Engineer
>>> > Plivo, Inc. 340 Pine St, San Francisco - 94104, USA
>>> > Web: www.plivo.com | Twitter: @plivo, @notmycommit
>>> >
>>> > Free Incoming SMS for All US Short Codes =E2=80=93 Get One Today!=EF=
=BB=BF
>>> >
>>> >
>>> >
>>> >
>>> > On Tue, Apr 21, 2015 at 12:33 PM, Dhananjay Balan <dhananjay at plivo.co=
m>
>>> wrote:
>>> >> pgpool doesn't seem to be invalidating caches properly. See the
>>> >> example test case below
>>> >>
>>> >> psql -U ruser -d mydb -h 127.0.0.1 -p 9999
>>> >> Password for user ruser:
>>> >> psql (9.4.1)
>>> >> Type "help" for help.
>>> >>
>>> >> mydb=3D> select comments from users where id=3D1;
>>> >>  comments
>>> >> ----------
>>> >>  boooo
>>> >> (1 row)
>>> >>
>>> >> # comes from cache
>>> >> mydb=3D> select comments from users where id=3D1;
>>> >>  comments
>>> >> ----------
>>> >>  boooo
>>> >> (1 row)
>>> >>
>>> >> # works
>>> >> mydb=3D> update users set comments=3D'hello' where id=3D1;
>>> >> UPDATE 1
>>> >> mydb=3D> select comments from users where id=3D1;
>>> >>  comments
>>> >> ----------
>>> >>  hello
>>> >> (1 row)
>>> >>
>>> >> # stale
>>> >> mydb=3D> update users set comments=3D'hello world' where id=3D1;
>>> >> UPDATE 1
>>> >> mydb=3D> select comments from users where id=3D1;
>>> >>  comments
>>> >> ----------
>>> >>  hello
>>> >> (1 row)
>>> >>
>>> >> # also stale
>>> >> mydb=3D> update users set comments=3D'booo' where id=3D1;
>>> >> UPDATE 1
>>> >> mydb=3D> select comments from users where id=3D1;
>>> >>  comments
>>> >> ----------
>>> >>  hello
>>> >> (1 row)
>>> >>
>>> >>
>>> >> From the second write onwards, the cache is not invalidated and stal=
e
>>> >> value is being served. Is it a bug or am I doing something wrong? Th=
is
>>> >> happens with both cache backends (memcache and shmem but test logs a=
re
>>> >> from memcache backend)
>>> >>
>>> >> Test setup is postgresql-9.4 and memcached 1.4.21 and pgpool-3.4.2. =
my
>>> >> configs and logs from test are here
>>> >>
>>> >> https://gist.github.com/dbalan/d635993a3e532a083751
>>> >>
>>> >> Regards,
>>> >> --------
>>> >> DHANANJAY | Infrastructure Engineer
>>> >> Plivo, Inc. 340 Pine St, San Francisco - 94104, USA
>>> >> Web: www.plivo.com | Twitter: @plivo, @notmycommit
>>> > _______________________________________________
>>> > pgpool-general mailing list
>>> > pgpool-general at pgpool.net
>>> > http://www.pgpool.net/mailman/listinfo/pgpool-general
>>> _______________________________________________
>>> pgpool-general mailing list
>>> pgpool-general at pgpool.net
>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>>>
>>
>>
>

--089e011608926620ec0514c39a80
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Message got clipped again. Resending<br><br><div><div><div=
><div>Hi,<br><br></div>This commit seems to have fixed the
 issue. However cache invalidation when multiple pgpools are used=20
(connecting to same memcache server) is (?) broken even with 3.3.5. Here
 are the logs from 3.3.5 <br><br><a href=3D"https://gist.github.com/dbalan/=
c5a93458d5c091c28c71" target=3D"_blank">https://gist.github.com/dbalan/c5a9=
3458d5c091c28c71</a><br><br></div>My test setup is two instances of 3.3.5 r=
unning on 9999 and 9988 of same machine with memcache running in localhost.=
<br></div><div><br></div><div>Logs:<br></div><div><br>From first pgpool,<br=
></div></div># First, read and update data - invalidates cache - this works=
 fine.<span class=3D""><br>psql -U ruser -d mydb -h 127.0.0.1 -p 9999<br>Pa=
ssword for user ruser:<br>psql (9.4.1)<br>Type &quot;help&quot; for help.<b=
r>=C2=A0<br>mydb=3D&gt; select comments from users where id=3D1;<br>=C2=A0=
=C2=A0=C2=A0 comments<br></span>----------------<br>=C2=A0boot me please<br=
>(1 row)<span class=3D""><br>=C2=A0<br>mydb=3D&gt; update users set comment=
s=3D&#39;hello&#39; where id=3D1;<br>UPDATE 1<br>mydb=3D&gt; select comment=
s from users where id=3D1;<br>=C2=A0comments<br>----------<br>=C2=A0hello<b=
r>(1 row)<br>=C2=A0<br></span>mydb=3D&gt;<br><div><br><br></div><div>Second=
 pgpool:<br># Connects via second deamon, reads stale data, i/e updates fro=
m this pgpool instance never invalidate cache.<br>=CE=BB ~/ psql -U ruser -=
d mydb -h 127.0.0.1 -p 9988<span class=3D""><br>Password for user ruser:<br=
>psql (9.4.1)<br>Type &quot;help&quot; for help.<br>=C2=A0<br>mydb=3D&gt; s=
elect comments from users where id=3D1;<br>=C2=A0comments<br>----------<br>=
</span>=C2=A0hello<br>(1 row)<span class=3D""><br>=C2=A0<br>mydb=3D&gt; upd=
ate users set comments=3D&#39;hello world&#39; where id=3D1;<br>UPDATE 1<br=
>mydb=3D&gt; select comments from users where id=3D1;<br>=C2=A0comments<br>=
----------<br>=C2=A0hello<br>(1 row)<br>=C2=A0<br></span>mydb=3D&gt;<br><br=
><br></div><div>The
 configs and full logs are attached in the link, They both are same=20
except for the directory paths and ports - not sure whats going wrong=20
here.<br></div><br><div class=3D"gmail_extra"><br clear=3D"all"><div><div c=
lass=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><b sty=
le=3D"font-size:small;font-family:tahoma,sans-serif">DHANANJAY=C2=A0</b><fo=
nt style=3D"font-size:small;font-family:tahoma,sans-serif" color=3D"#666666=
">| Infrastructure Engineer</font><br></div><div dir=3D"ltr"><div style=3D"=
font-size:small;font-family:arial"><div><span style=3D"color:rgb(102,102,10=
2);font-family:tahoma,sans-serif;font-size:13px;line-height:16.12px">Plivo,=
 Inc. 340 Pine St, San Francisco - 94104, USA</span><font face=3D"tahoma, s=
ans-serif"><font color=3D"#666666"><br></font></font></div><div><font face=
=3D"tahoma, sans-serif"><font color=3D"#666666">Web:</font>=C2=A0<a href=3D=
"http://www.plivo.com/" style=3D"color:rgb(17,85,204)" target=3D"_blank">ww=
w.plivo.com</a>=C2=A0<font color=3D"#666666">| Twitter:</font>=C2=A0<a href=
=3D"http://twitter.com/plivo" style=3D"color:rgb(17,85,204)" target=3D"_bla=
nk">@plivo</a>, <a href=3D"https://twitter.com/notmycommit" target=3D"_blan=
k">@notmycommit</a></font></div><div><br><a href=3D"https://www.plivo.com/s=
ms-short-code/?utm=3Demailsig" target=3D"_blank">Free Incoming SMS for All =
US Short Codes =E2=80=93 Get One Today!</a>=EF=BB=BF<br></div><div><br></di=
v></div></div><div>On Mon, Apr 27, 2015 at 5:29 PM, Dhananjay Balan <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:dhananjay at plivo.com" target=3D"_blank">dha=
nanjay at plivo.com</a>&gt;</span> wrote:<br></div></div></div></div></div></d=
iv><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:=
1ex"><div dir=3D"ltr"><div><div><div><div>Hi,<br><br></div>This commit seem=
s to have fixed the issue. However cache invalidation when multiple pgpools=
 are used (connecting to same memcache server) is (?) broken even with 3.3.=
5. Here are the logs from 3.3.5 <br><br><a href=3D"https://gist.github.com/=
dbalan/c5a93458d5c091c28c71" target=3D"_blank">https://gist.github.com/dbal=
an/c5a93458d5c091c28c71</a><br><br></div>My test setup is two instances of =
3.3.5 running on 9999 and 9988 of same machine with memcache running in loc=
alhost.<br><br></div>From first pgpool,<br></div><br># First, read and upda=
te data - invalidates cache - this works fine.<span class=3D""><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 &quot;help&quot; for help.<br>=C2=A0<br>mydb=3D&gt; select comm=
ents from users where id=3D1;<br>=C2=A0=C2=A0=C2=A0 comments<br></span>----=
------------<br>=C2=A0boot me please<br>(1 row)<span class=3D""><br>=C2=A0<=
br>mydb=3D&gt; update users set comments=3D&#39;hello&#39; where id=3D1;<br=
>UPDATE 1<br>mydb=3D&gt; select comments from users where id=3D1;<br>=C2=A0=
comments<br>----------<br>=C2=A0hello<br>(1 row)<br>=C2=A0<br></span>mydb=
=3D&gt;<br><div><div><br><br></div><div>Second pgpool:<br># Connects via se=
cond deamon, reads stale data, i/e updates from this pgpool instance never =
invalidate cache.<br>=CE=BB ~/ psql -U ruser -d mydb -h 127.0.0.1 -p 9988<s=
pan class=3D""><br>Password for user ruser:<br>psql (9.4.1)<br>Type &quot;h=
elp&quot; for help.<br>=C2=A0<br>mydb=3D&gt; select comments from users whe=
re id=3D1;<br>=C2=A0comments<br>----------<br></span>=C2=A0hello<br>(1 row)=
<span class=3D""><br>=C2=A0<br>mydb=3D&gt; update users set comments=3D&#39=
;hello world&#39; where id=3D1;<br>UPDATE 1<br>mydb=3D&gt; select comments =
from users where id=3D1;<br>=C2=A0comments<br>----------<br>=C2=A0hello<br>=
(1 row)<br>=C2=A0<br></span>mydb=3D&gt;<br><br><br></div><div>The configs a=
nd full logs are attached in the link, They both are same except for the di=
rectory paths and ports - not sure whats going wrong here.<br></div><div><b=
r><a href=3D"https://gist.github.com/dbalan/c5a93458d5c091c28c71" target=3D=
"_blank">https://gist.github.com/dbalan/c5a93458d5c091c28c71<br></a><br><br=
></div><div><div><div><br></div></div></div></div></div><div class=3D"gmail=
_extra"><span class=3D""><br clear=3D"all"><div><div><div dir=3D"ltr"><div>=
<div dir=3D"ltr"><div><b style=3D"font-size:small;font-family:tahoma,sans-s=
erif">DHANANJAY=C2=A0</b><font style=3D"font-size:small;font-family:tahoma,=
sans-serif" color=3D"#666666">| Infrastructure Engineer</font><br></div><di=
v dir=3D"ltr"><div style=3D"font-size:small;font-family:arial"><div><span s=
tyle=3D"color:rgb(102,102,102);font-family:tahoma,sans-serif;font-size:13px=
;line-height:16.12px">Plivo, Inc. 340 Pine St, San Francisco - 94104, USA</=
span><font face=3D"tahoma, sans-serif"><font color=3D"#666666"><br></font><=
/font></div><div><font face=3D"tahoma, sans-serif"><font color=3D"#666666">=
Web:</font>=C2=A0<a href=3D"http://www.plivo.com/" style=3D"color:rgb(17,85=
,204)" target=3D"_blank">www.plivo.com</a>=C2=A0<font color=3D"#666666">| T=
witter:</font>=C2=A0<a href=3D"http://twitter.com/plivo" style=3D"color:rgb=
(17,85,204)" target=3D"_blank">@plivo</a>, <a href=3D"https://twitter.com/n=
otmycommit" target=3D"_blank">@notmycommit</a></font></div><div><br><a href=
=3D"https://www.plivo.com/sms-short-code/?utm=3Demailsig" target=3D"_blank"=
>Free Incoming SMS for All US Short Codes =E2=80=93 Get One Today!</a>=EF=
=BB=BF<br></div><div><br></div></div></div><div><br></div></div></div></div=
></div></div>
<br></span><div><div class=3D"h5"><div class=3D"gmail_quote">On Thu, Apr 23=
, 2015 at 5:11 PM, Muhammad Usama <span dir=3D"ltr">&lt;<a href=3D"mailto:m=
.usama at gmail.com" target=3D"_blank">m.usama at gmail.com</a>&gt;</span> wrote:=
<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor=
der-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Hi<d=
iv><br></div><div>I have found the problem, It was because of the buffer fo=
r storing table oids=C2=A0was 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><span><font color=3D"#888888=
"><div>Muhammad Usama</div></font></span><div><div><div><br></div><div clas=
s=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, Apr 22, 2015 at 2:=
09 PM, Tatsuo Ishii <span dir=3D"ltr">&lt;<a href=3D"mailto:ishii at postgresq=
l.org" target=3D"_blank">ishii at postgresql.org</a>&gt;</span> wrote:<br><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);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 =3D &#39;bbb&#39; where i =3D 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=3D"http://www.sraoss.co.jp/index_en.php" target=3D"_blank"=
>http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href=3D"http://www.sraoss.co.jp" target=3D"_blank">http://www.s=
raoss.co.jp</a><br>
<div><div><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=3D&gt; select comments from users where id=3D1;<br>
&gt;=C2=A0 comments<br>
&gt; ----------<br>
&gt;=C2=A0 boooo<br>
&gt; (1 row)<br>
&gt;<br>
&gt; # comes from cache<br>
&gt; mydb=3D&gt; select comments from users where id=3D1;<br>
&gt;=C2=A0 comments<br>
&gt; ----------<br>
&gt;=C2=A0 boooo<br>
&gt; (1 row)<br>
&gt;<br>
&gt; # works<br>
&gt; mydb=3D&gt; update users set comments=3D&#39;hello&#39; where id=3D1;<=
br>
&gt; UPDATE 1<br>
&gt; mydb=3D&gt; select comments from users where id=3D1;<br>
&gt;=C2=A0 comments<br>
&gt; ----------<br>
&gt;=C2=A0 hello<br>
&gt; (1 row)<br>
&gt;<br>
&gt; # stale<br>
&gt; mydb=3D&gt; update users set comments=3D&#39;hello world&#39; where id=
=3D1;<br>
&gt; UPDATE 1<br>
&gt; mydb=3D&gt; select comments from users where id=3D1;<br>
&gt;=C2=A0 comments<br>
&gt; ----------<br>
&gt;=C2=A0 hello<br>
&gt; (1 row)<br>
&gt;<br>
&gt; # also stale<br>
&gt; mydb=3D&gt; update users set comments=3D&#39;booo&#39; where id=3D1;<b=
r>
&gt; UPDATE 1<br>
&gt; mydb=3D&gt; select comments from users where id=3D1;<br>
&gt;=C2=A0 comments<br>
&gt; ----------<br>
&gt;=C2=A0 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=3D"https://gist.github.com/dbalan/d635993a3e532a083751" target=
=3D"_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=3D"http://www.plivo.com" target=3D"_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=3D"http://www.plivo.com" target=3D"_blank">www.plivo.com<=
/a> | Twitter: @plivo, @notmycommit<br>
&gt;<br>
&gt; Free Incoming SMS for All US Short Codes =E2=80=93 Get One Today!=EF=
=BB=BF<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Apr 21, 2015 at 12:33 PM, Dhananjay Balan &lt;<a href=3D"mailt=
o:dhananjay at plivo.com" target=3D"_blank">dhananjay at plivo.com</a>&gt; wrote:=
<br>
&gt;&gt; pgpool doesn&#39;t seem to be invalidating caches properly. See th=
e<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=3D&gt; select comments from users where id=3D1;<br>
&gt;&gt;=C2=A0 comments<br>
&gt;&gt; ----------<br>
&gt;&gt;=C2=A0 boooo<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt; # comes from cache<br>
&gt;&gt; mydb=3D&gt; select comments from users where id=3D1;<br>
&gt;&gt;=C2=A0 comments<br>
&gt;&gt; ----------<br>
&gt;&gt;=C2=A0 boooo<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt; # works<br>
&gt;&gt; mydb=3D&gt; update users set comments=3D&#39;hello&#39; where id=
=3D1;<br>
&gt;&gt; UPDATE 1<br>
&gt;&gt; mydb=3D&gt; select comments from users where id=3D1;<br>
&gt;&gt;=C2=A0 comments<br>
&gt;&gt; ----------<br>
&gt;&gt;=C2=A0 hello<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt; # stale<br>
&gt;&gt; mydb=3D&gt; update users set comments=3D&#39;hello world&#39; wher=
e id=3D1;<br>
&gt;&gt; UPDATE 1<br>
&gt;&gt; mydb=3D&gt; select comments from users where id=3D1;<br>
&gt;&gt;=C2=A0 comments<br>
&gt;&gt; ----------<br>
&gt;&gt;=C2=A0 hello<br>
&gt;&gt; (1 row)<br>
&gt;&gt;<br>
&gt;&gt; # also stale<br>
&gt;&gt; mydb=3D&gt; update users set comments=3D&#39;booo&#39; where id=3D=
1;<br>
&gt;&gt; UPDATE 1<br>
&gt;&gt; mydb=3D&gt; select comments from users where id=3D1;<br>
&gt;&gt;=C2=A0 comments<br>
&gt;&gt; ----------<br>
&gt;&gt;=C2=A0 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 st=
ale<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=3D"https://gist.github.com/dbalan/d635993a3e532a083751" ta=
rget=3D"_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=3D"http://www.plivo.com" target=3D"_blank">www.plivo.=
com</a> | Twitter: @plivo, @notmycommit<br>
&gt; _______________________________________________<br>
&gt; pgpool-general mailing list<br>
&gt; <a href=3D"mailto:pgpool-general at pgpool.net" target=3D"_blank">pgpool-=
general at pgpool.net</a><br>
&gt; <a href=3D"http://www.pgpool.net/mailman/listinfo/pgpool-general" targ=
et=3D"_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
_______________________________________________<br>
pgpool-general mailing list<br>
<a href=3D"mailto:pgpool-general at pgpool.net" target=3D"_blank">pgpool-gener=
al at pgpool.net</a><br>
<a href=3D"http://www.pgpool.net/mailman/listinfo/pgpool-general" target=3D=
"_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>

--089e011608926620ec0514c39a80--


More information about the pgpool-general mailing list