[pgpool-general: 7639] Re: Pgpool query caching

Tatsuo Ishii ishii at sraoss.co.jp
Mon Jul 12 15:27:49 JST 2021


> Hi,
> 
> After enabling memory_cache_enabled = on, got the following in log:
> 2021-07-09 02:53:52: pid 110880: LOG:  error while deleting item from shmem
> cache, item: 86 was already deleted
> 2021-07-09 02:53:52: pid 110880: LOG:  error while deleting item from shmem
> cache, item: 86 was already deleted
> 2021-07-09 02:53:52: pid 110880: LOG:  error while deleting item from shmem
> cache, item: 86 was already deleted
> 2021-07-09 02:53:52: pid 110720: LOG:  pool_reuse_block: blockid: 3
> 
> May I know what might be the cause?

Do those messages appear frequently? If not, I think they are harmless
and you can safely ignore (downgrading the messages from LOG to DEBUG
is in my plan).

> * num_cache_hits | num_selects | cache_hit_ratio | num_hash_entries |
> used_hash_entries | num_cache_entries | used_cache_entries_size |
> free_cache_entries_size | fragment_cache_entries_size
> ----------------+-------------+-----------------+------------------+-------------------+-------------------+-------------------------+-------------------------+-----------------------------
> 7797
>           | 33619       | 0.19            | 1048576          | 858
>       | 858               | 872837                  | 62534330
>    | 3663873(1 row)*
> 
> As per this cache status is it recommended to enable cache?

No. We generally recommend to enable cache if the cache hit rate is
higher than 0.7 (70%).

> Is there any option to enable query caching only for selected tables?

Yes, you can use cache_safe_memqcache_table_list or
cache_unsafe_memqcache_table_list.

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



More information about the pgpool-general mailing list