View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000605 | Pgpool-II | General | public | 2020-04-20 17:01 | 2020-04-21 16:18 |
| Reporter | Xavok | Assigned To | t-ishii | ||
| Priority | normal | Severity | tweak | Reproducibility | have not tried |
| Status | closed | Resolution | open | ||
| Product Version | 4.1.0 | ||||
| Summary | 0000605: Shared memcache for multiple pgpool instances | ||||
| Description | Hi 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? | ||||
| Tags | No tags attached. | ||||
|
|
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. |
|
|
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? |
|
|
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. |
|
|
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. |
|
|
thanks for the information! |
|
|
Close this task please i can't find how to do it :) |
|
|
Let me handle it. Thanks! |
| 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 |