agora inbox for pgpool-committers@postgresql.org  
help / color / mirror / Atom feed
pgpool: Fix session local relation cache case bug.
5+ messages / 1 participants
[nested] [flat]

* pgpool: Fix session local relation cache case bug.
@ 2026-03-25 09:40 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Tatsuo Ishii @ 2026-03-25 09:40 UTC (permalink / raw)
  To: pgpool-committers@lists.postgresql.org

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=7e96543c7001910774ab691c4320c626b01a4...

Modified Files
--------------
src/utils/pool_relcache.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgpool: Fix session local relation cache case bug.
@ 2026-03-25 09:40 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Tatsuo Ishii @ 2026-03-25 09:40 UTC (permalink / raw)
  To: pgpool-committers@lists.postgresql.org

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_5_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=c173c7c7902f144e2bb3c3a061fa44159fde8...

Modified Files
--------------
src/utils/pool_relcache.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgpool: Fix session local relation cache case bug.
@ 2026-03-25 09:41 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Tatsuo Ishii @ 2026-03-25 09:41 UTC (permalink / raw)
  To: pgpool-committers@lists.postgresql.org

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_6_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=39a433adf5e1696b93ba72b0c50ae095cb7a0...

Modified Files
--------------
src/utils/pool_relcache.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgpool: Fix session local relation cache case bug.
@ 2026-03-25 09:41 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Tatsuo Ishii @ 2026-03-25 09:41 UTC (permalink / raw)
  To: pgpool-committers@lists.postgresql.org

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_7_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=62343bcdb582e29b6a6c942798fc2c9d5587d...

Modified Files
--------------
src/utils/pool_relcache.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgpool: Fix session local relation cache case bug.
@ 2026-03-25 09:41 Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Tatsuo Ishii @ 2026-03-25 09:41 UTC (permalink / raw)
  To: pgpool-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=0dd2abd5c22e63c720f1b7da106c6e1f52984...

Modified Files
--------------
src/utils/pool_relcache.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2026-03-25 09:41 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-25 09:40 pgpool: Fix session local relation cache case bug. Tatsuo Ishii <ishii@postgresql.org>
2026-03-25 09:40 pgpool: Fix session local relation cache case bug. Tatsuo Ishii <ishii@postgresql.org>
2026-03-25 09:41 pgpool: Fix session local relation cache case bug. Tatsuo Ishii <ishii@postgresql.org>
2026-03-25 09:41 pgpool: Fix session local relation cache case bug. Tatsuo Ishii <ishii@postgresql.org>
2026-03-25 09:41 pgpool: Fix session local relation cache case bug. Tatsuo Ishii <ishii@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox