[pgpool-hackers: 1791] Re: Problem with locking in In Memory Cache

Tatsuo Ishii ishii at sraoss.co.jp
Tue Sep 6 08:06:13 JST 2016


You are right. Pgpool-II should have fowarded sync message from
frontend to backend. Attached is a patch against 3.4 stable tree.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Thank you for the report. I 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
> 
>> Hi, 
>> 
>> I have found a problem with table locking In In Memory Cache feature.
>> Confirmed in pgpool-II 3.4.8 in both memcached and sharedmemory mode.
>> 
>> When using JDBC to access to pgpool-II. In the second time of (the same) query 
>> executing, it returned result from cached, but after that pg_stat_activity's state of query 
>> was still in 'active' and not change. 
>> So the locks made by executed query was not release too.
>> 
>> Take a look at source and i found that, in extended protocol, locking of table 
>> was made when 'P'(Parse) message is sent, and release when 'S'(Sync) message
>> is sent to backend.
>> But when memory_cache_enabled is true. Parse message is sent but Sync message 
>> is not sent to backend.
>> In pool_fetch_from_memory_cache function. It sound that when cache found, 
>> Sync message from frontend was discard but not forward to backend to finish query.
>> I think, it is necessary to tell to backend to finish executed query here, is that right?
>> 
>> Best regards,
>> ---
>> Dang Minh Huong
>> NEC Solution Innovators, Ltd.
>> http://www.nec-solutioninnovators.co.jp/en/
>> _______________________________________________
>> pgpool-hackers mailing list
>> pgpool-hackers at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: query_cache.diff
Type: text/x-patch
Size: 1986 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20160906/d463c5d0/attachment.bin>


More information about the pgpool-hackers mailing list