[pgpool-committers: 670] pgpool: Fix long standing problem with do_query(). When 1) extended pro

Tatsuo Ishii ishii at postgresql.org
Tue Oct 2 09:44:05 JST 2012


Fix long standing problem with do_query(). When 1) extended protocol
used and 2)unnamed portal is used and 3) no explicit transaction is
used, user's unnamed portal is removed by Sync message. This is
because Sync message closes transaction and unnamed portal is
removed. This leads to "portal "" does not exist" error.

Fix is, use "Flush" message instead of Sync. Main difference between
using Sync and Flush is, Flush does not return Ready for Query
message. So do_query() does not return until all expected responses
are returned. It seems the order of messages returned from backend is
random, and do_query() manages it by using state bits.

Branch
------
V3_1_STABLE

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

Modified Files
--------------
pool_process_query.c |   57 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 52 insertions(+), 5 deletions(-)



More information about the pgpool-committers mailing list