[pgpool-committers: 5210] pgpool: Fix occasional less data returned to frontend.
Tatsuo Ishii
ishii at sraoss.co.jp
Fri Oct 12 14:17:24 JST 2018
Fix occasional less data returned to frontend.
While piggy-packing queries to system catalog data,
pool_push_pending_data() is responsible for pushing response from
backend. To judge whether pending data remains or not, it checks
socket fd of backend and dummy close message response (close
complete). Problem is, if the socket is not ready and accidentally
actual (non dummy) close message response is returned,
pool_push_pending_data() believes that there's no pending data any
more. As a result, some of pending data is not recovered after
returning to normal process.
The idea for fix is, use pending message data list. It records
messages from frontend, and it is expected that we will receive same
number of messages (or more -- e.g. execute message). So we can use
the data to make above judgment more robust for the case described
above.
Initial patch is created by Yugo Nagata. Fix to the patch for certain
cases by me.
See:
https://www.pgpool.net/mantisbt/view.php?id=432
for more details.
Branch
------
V3_6_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=f1b657235be83de2a589118b2d7e9140c1a02358
Modified Files
--------------
src/context/pool_session_context.c | 29 +++++++++++++++++++++++++++++
src/include/context/pool_session_context.h | 1 +
src/protocol/pool_process_query.c | 9 ++++++++-
3 files changed, 38 insertions(+), 1 deletion(-)
More information about the pgpool-committers
mailing list