[pgpool-hackers: 1787] Problem with locking in In Memory Cache
Huong Dangminh
huo-dangminh at ys.jp.nec.com
Sun Sep 4 12:22:18 JST 2016
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/
More information about the pgpool-hackers
mailing list