[pgpool-committers: 2616] pgpool: Fix reset query stuck problem. (Porting the solution from older

Muhammad Usama m.usama at gmail.com
Tue Aug 18 21:26:25 JST 2015


Fix reset query stuck problem. (Porting the solution from older branches)

It is reported that reset query (DISCARD ALL etc.) occasionally does not finish
and pgpool child remain waiting for reply from the backend thus client cannot
connect to pgpool (for example http://www.pgpool.net/mantisbt/view.php?id=107).
The cause of problem is not identified yet but if client suddenly closes
connection to pgpool in the middle of query processing, backend may not accept
the reset queries because they are not ready for query.

The fix is to keep track of the status of frontend socket state and not caching
the PostgreSQL connection if the connection to frontend was not properly terminated.

Branch
------
V3_4_STABLE

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

Modified Files
--------------
src/include/pool.h      |    9 ++++++++-
src/protocol/child.c    |   32 ++++++++++++++++++++------------
src/utils/pool_stream.c |   14 +++++++++-----
3 files changed, 37 insertions(+), 18 deletions(-)



More information about the pgpool-committers mailing list