[pgpool-committers: 3237] pgpool: If statement timeout is enabled on backend and do_query() sends

Tatsuo Ishii ishii at postgresql.org
Tue May 24 23:43:28 JST 2016


If statement timeout is enabled on backend and do_query() sends a
query to primary node, and all of following user queries are sent to
standby, it is possible that the next command, for example END, could
cause a statement timeout error on the primary, and a kind mismatch
error on pgpool-II is raised.

This fix tries to mitigate the problem by sending sync message instead
of flush message in do_query(), expecting that the sync message reset
the statement timeout timer if we are in an explicit transaction. We
cannot use this technique for implicit transaction case, because the
sync message removes the unnamed portal if there's any.

Plus, pg_stat_statement will no longer show the query issued by
do_query() as "running".

Per bug194.

Branch
------
V3_5_STABLE

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

Modified Files
--------------
src/protocol/pool_process_query.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)



More information about the pgpool-committers mailing list