View Issue Details

IDProjectCategoryView StatusLast Update
0000605Pgpool-IIGeneralpublic2020-04-21 16:18
ReporterXavok Assigned Tot-ishii  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionopen 
Product Version4.1.0 
Summary0000605: Shared memcache for multiple pgpool instances
DescriptionHi
Tell me please, I have 2 copies of pgpool working in parallel and a round robin balancer in front of them. On each instance, several mirror-like pgpool services are running. Is it possible to make a common external memcache server for them, that is, so that services on instances 1 and 2 connecting to the same database see the same cache?
TagsNo tags attached.

Activities

t-ishii

2020-04-21 13:08

developer   ~0003332

First of all, please send questions to the mailing list. This forum is to report bugs or problems.

Unfortunately the configuration you are thinking will not work. Pgpool-II's caching system stores cache invalidation information into local file. When a cache entry is created, the file info (actually table OIDs) are store into the file. If Pgpool-II recieves DML (INSERT/UPDATE/DELETE), it looks into the local file. If the target of DML, table OID, is found in the local file, Pgpool-II invalidates the cache entry because the cache may not be consistent with the table SELECT is looking at. Suppose pgpool-A receives SELECT and creates a cache entry and also DML touches the table SELECT is looking at. In this case the cache entry will be invalidated. However if pgpool-B receives the DML, it will not find the cache info in the local file. So the cache will not be invalidated and cache becomes inconsistent.

Xavok

2020-04-21 13:54

reporter   ~0003333

I apologize for creating the task here
thanks for the information
Please tell me, are there any plans for finalizing a similar solution with a cache for multi-instances in the future?

t-ishii

2020-04-21 14:17

developer   ~0003334

Last edited: 2020-04-21 14:18

Yeah actually once I tried it and failed. My idea was storing the OID data onto memcached instead of using local files. It failed because memcached feels free to purge old data and Pgpool-II lost the OID information. If I could find reliable and efficient in memory object server, I might try it again.

t-ishii

2020-04-21 14:23

developer   ~0003335

One of workarounds is setting memqcache_expire = n where n is apropreate cache life time for you. This way, the cache will be removed if it is accessed n seconds after it was created. Of course the down side is the cache will be removed even if it's not a stale entry.

Xavok

2020-04-21 16:02

reporter   ~0003336

thanks for the information!

Xavok

2020-04-21 16:04

reporter   ~0003337

Close this task please i can't find how to do it :)

t-ishii

2020-04-21 16:17

developer   ~0003338

Let me handle it. Thanks!

Issue History

Date Modified Username Field Change
2020-04-20 17:01 Xavok New Issue
2020-04-21 11:23 t-ishii Assigned To => t-ishii
2020-04-21 11:23 t-ishii Status new => assigned
2020-04-21 13:08 t-ishii Note Added: 0003332
2020-04-21 13:09 t-ishii Status assigned => feedback
2020-04-21 13:54 Xavok Note Added: 0003333
2020-04-21 13:54 Xavok Status feedback => assigned
2020-04-21 14:17 t-ishii Note Added: 0003334
2020-04-21 14:18 t-ishii Note Edited: 0003334
2020-04-21 14:23 t-ishii Note Added: 0003335
2020-04-21 16:02 Xavok Note Added: 0003336
2020-04-21 16:04 Xavok Note Added: 0003337
2020-04-21 16:17 t-ishii Note Added: 0003338
2020-04-21 16:18 t-ishii Status assigned => closed