[pgpool-general: 5454] Re: error while deleting item from shmem cache, item: N was already deleted

Tatsuo Ishii ishii at sraoss.co.jp
Fri May 12 15:46:45 JST 2017


> Are  these  messages in  pgpool  log something to worry about or is it
> normal? There are a lot of them with different item numbers:
> 
> May 11 12:44:11 ip-172-31-20-153 pgpool[30592]: [15-1] LOG:  error while deleting item from shmem cache, item: 70 was already deleted
> May 11 12:44:11 ip-172-31-20-153 pgpool[30592]: [15-2] LOCATION:  pool_memqcache.c:2484
> May 11 12:44:11 ip-172-31-20-153 pgpool[30592]: [16-1] LOG:  error while deleting item from shmem cache, item: 71 was already deleted
> May 11 12:44:11 ip-172-31-20-153 pgpool[30592]: [16-2] LOCATION:  pool_memqcache.c:2484
> May 11 12:44:11 ip-172-31-20-153 pgpool[30592]: [17-1] LOG:  error while deleting item from shmem cache, item: 83 was already deleted
> May 11 12:44:11 ip-172-31-20-153 pgpool[30592]: [17-2] LOCATION:  pool_memqcache.c:2484

Yes, they are normal. Pgpool-II remembers each cache item number in a
file. Suppose following SELECTS created cache item number 1 and 2
accordingly.

SELECT * FROM A; -- cache item number 1
SELECT * FROM A,B; -- cache item number 2

Then file a and b are created. File a, corresponding to TABLE A,
contains cache item number 1 and 2, while file b, corresponding to
TABLE B, contains cache item number 2.

Then user issues "DELETE FROM A". Pgpool-II read file a. So it gets
cache item number 1 and 2 then deletes them. Next user issues "DELETE
FROM B". Pgpool-II read file b. So it gets cache item number 2 then
tries to delete it. Because it's already deleted by "DELETE FROM A",
it emits a log message you are seeing.

Probably we should down grade the message level from LOG to DEBUG1 or
so to not confuse users.

> Also, pool_cache shows number of cache hits far greater than number
> of selects, is it ok?

Yes, it's ok. It is possible that 1 SELECT was issued then the same
cache item is accessed 100 times. In this case, the cache hit ration
would be 100/(1+100) = 99%.

> show pool_cache;
> -[ RECORD 1 ]---------------+------
> num_cache_hits              | 32671
> num_selects                 | 3866
> cache_hit_ratio             | 0.89
> num_hash_entries            | 0
> used_hash_entries           | 0
> num_cache_entries           | 0
> used_cache_entries_size     | 0
> free_cache_entries_size     | 0
> fragment_cache_entries_size | 0

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