[Pgpool-hackers] Invalidating relcache

Tatsuo Ishii ishii at sraoss.co.jp
Sun Jan 16 10:33:19 UTC 2011


> Le 15/01/2011 04:01, Tatsuo Ishii a écrit :
>>>> Pgpool-II maintaines internal relation cache to caching the query
>>>> result against backend. The cache scope is per session i.e. existing
>>>> in pgpool child process. The cache is mainly used for inquring system
>>>> catalog to know if the table is a tempory one, or rewirting timestamp
>>>> for example. Problem is, if the structure of a table which is in the
>>>> cache is changed by ALTER TABLE ADD COLUMN or some such, the contents
>>>> of the relcache are not valid anymore.
>>>>
>>>> The only solution at present is, restarting pgpool or using
>>>> child_life_time, not super conveninet.
>>>>
>>>> My idea is adding an expiration timer in the cache entry so that the
>>>> cache entry is invalidated after N seconds. The N can be changed by
>>>> editing pgpool.conf.
>>>>
>>>> Thoughts?
>>>
>>> Seems interesting. 0 would mean no timer I guess?
>> 
>> Yes, that would be appropreate and mybe the default value for backward
>> compatibility sake?
> 
> Sure.

Done. New directive is "relcache_expire".
--
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-hackers mailing list