[pgpool-general: 8392] Re: Query cache in shared memory bed performance

Tatsuo Ishii ishii at sraoss.co.jp
Tue Sep 13 13:18:35 JST 2022


> Hi,
> 
> I ran 100 connections concurrently with pooling and query cache enabled,
> and I saw a poor performance which indicting  on a very big query waits.
> 
> I found in code that there is a locking mechanism when fetching from shmem.
> 
> Could you please share why you make a critical section when pgpool trying
> to read from cache?

Because concurrent modifications to the tables could delete query
cache, which will confuse process that are reading the cache.

Ideally the process reading query cache should only grab a shared
lock, which will not block other reading process. Unfortunately we do
not have shared lock facility (we only have exclusive lock).

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list