| From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
|---|---|
| To: | pgpool-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgpool: Fix session local relation cache case bug. |
| Date: | 2026-03-25 09:40:51 |
| Message-ID: | E1w5KjJ-000kTP-1f@gothos.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgpool-committers |
Fix session local relation cache case bug.
pool_search_relcache did not consider the session local cache case
such as temp table search. It created the search result in shared
relation cache even if the relation cache is session local. As a
result subsequent query against the session local cache is returned
from the shared relation cache. This could cause wrong
result. Example:
create table t1(i int);
select * from t1; -- info "t1 is not a temp table" is registered in shared cache
drop table t1;
create temp table t1(i int);
select * from t1; -- shared cache tells that t1 is not temp table and it could be load balanced,
-- it could access non existent table from standby nodes.
Fix is, to not register a temp table to shared relation cache if it's
a session local cache.
Discussion: https://github.com/pgpool/pgpool2/issues/154
Backpatch-through: v4.4
Branch
------
V4_4_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=7e96543c7001910774ab691c4320c626b01a40c5
Modified Files
--------------
src/utils/pool_relcache.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2026-03-25 09:40:57 | pgpool: Fix session local relation cache case bug. |
| Previous Message | Tatsuo Ishii | 2026-03-25 02:54:43 | pgpool: Add comments to where_to_send_main_replica() and dml_adaptive() |