[pgpool-committers: 3236] 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_1_STABLE

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

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



More information about the pgpool-committers mailing list