[pgpool-committers: 3232] 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
------
master

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

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



More information about the pgpool-committers mailing list