[pgpool-committers: 10447] pgpool: Fix long standing bind bug with query cache.

Tatsuo Ishii ishii at postgresql.org
Thu May 8 21:39:28 JST 2025


Fix long standing bind bug with query cache.

When a named statement is prepared, it is possible to bind then
execute without a parse message. Problem is, table oids which are
necessary to invalidate query cache at execute or COMMIT was collected
only in parse messages process (Parse()). Thus if bind is executed
without parse after previous execute, no table oids were collected,
and pgpool failed to invalidate query cache.

Fix is collecting table oids at bind time too.

Add regression test to 006.memqcache.

Problem reported by and test program provided by Achilleas Mantzios
<a.mantzios at cloud.gatewaynet.com>.

Discussion: [pgpool-general: 9427] Clarification on query results cache visibility
https://www.pgpool.net/pipermail/pgpool-general/2025-April/009430.html

Backpatch-through: v4.2

Branch
------
master

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

Modified Files
--------------
src/protocol/pool_proto_modules.c                  | 27 +++++++++++
src/test/regression/tests/006.memqcache/expected.6 | 38 +++++++++++++++
src/test/regression/tests/006.memqcache/expected.7 | 54 ++++++++++++++++++++++
.../tests/006.memqcache/query_cache_bug6.data      | 38 +++++++++++++++
.../tests/006.memqcache/query_cache_bug7.data      | 52 +++++++++++++++++++++
src/test/regression/tests/006.memqcache/test.sh    |  7 ++-
6 files changed, 215 insertions(+), 1 deletion(-)



More information about the pgpool-committers mailing list