[pgpool-committers: 3770] pgpool: Fix query cache bug reported in pgpool-general-jp:1441.

Tatsuo Ishii ishii at postgresql.org
Thu Jan 19 08:39:59 JST 2017


Fix query cache bug reported in pgpool-general-jp:1441.

In streaming replication mode with query cache enabled, SELECT hangs
in the following scenario:

1) a SELECT hits query cache and returns rows from the query cache.
2) following SELECT needs to search meta data and it hangs.

In #1, while returning the cached result, it misses to call
pool_unset_pending_response(), which leave the pending_response flag
be set. In #2, do_query() checks the flag and tries to read pending
response from backend. Since there's no pending data in backend, it
hangs in reading data from backend.

Fix is, just call pool_unset_pending_response() in #1 to reset the
flag.

Bug report and fix provided by Nobuyuki Nagai.

New regression test item (068) added by me.

Branch
------
V3_5_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=7a1feff02c7b5581170bcfa03f9bb3a22b177320

Modified Files
--------------
src/protocol/pool_proto_modules.c                  |  1 +
.../regression/tests/068.memqcache_bug/Sample.java | 50 ++++++++++++++++++++++
.../regression/tests/068.memqcache_bug/test.sh     | 38 ++++++++++++++++
3 files changed, 89 insertions(+)



More information about the pgpool-committers mailing list