[Pgpool-committers] pgpool - pgpool-II: Fix bug with SimpleForwardToFrontend().

User T-ishii t-ishii at pgfoundry.org
Fri Jun 26 04:59:37 UTC 2009


Log Message:
-----------
Fix bug with SimpleForwardToFrontend().  Clients using the extend
protocol send 'H'(Flush) after each command. Problem is,
SimpleForwardToFrontend does not immediately forward 'C'(Command
Complete) packet to frontend. So the client sends 'H' and wait for
'C'. On the other hand backend receives 'H' but reply back nothing
since Command complete has nothing to be returned. Both side stuck.

The fix is, forwarding 'C' packet immediately after receiving it from
backend. To prevent similar bugs happen in the future, I put
pool_flush(frontend) after calling SimpleForwardToFrontend in
pool_process_query() (other places already do this).

The extra pool_flush() might harm performance. So I did some tests
using pgbench -S, and found nothing has been changed regarding
performance after patching.

Bug report from Gavin Sherry along with patches for
SimpleForwardToFrontend().

Tags:
----
V2_2_STABLE

Modified Files:
--------------
    pgpool-II:
        pool_process_query.c (r1.141.2.5 -> r1.141.2.6)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgpool/pgpool-II/pool_process_query.c?r1=1.141.2.5&r2=1.141.2.6)


More information about the Pgpool-committers mailing list