[pgpool-committers: 9441] pgpool: Prevent query cache update under shared lock.
Tatsuo Ishii
ishii at sraoss.co.jp
Wed Jun 14 11:28:47 JST 2023
Prevent query cache update under shared lock.
In https://www.pgpool.net/mantisbt/view.php?id=795 it was pointed out
that expired query cache entry can be modified under shared lock. This
could cause shared memory corruption used by query cache. In order to
fix this, we temporarily release the shared lock and then acquire an
exclusive lock before modifying the cache entry. This could create a
window and we need to get the cache entry meta data again to make sure
that the meta data has not been modified by someone else.
Back-patch to V4.4 stable where shared locking for query cache was
introduced.
Branch
------
V4_4_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=a091bcb4dece8b09089689a8fa775136f61e75df
Modified Files
--------------
src/query_cache/pool_memqcache.c | 37 +++++++++++++++++++++++++++++++------
1 file changed, 31 insertions(+), 6 deletions(-)
More information about the pgpool-committers
mailing list