Rearm statement_timeout after each executed query.
Rearm statement_timeout after each executed query.

Previously statement_timeout, in the extended protocol, affected all
messages till a Sync message.  For clients that pipeline/batch query
execution that's problematic.

Instead disable timeout after each Execute message, and enable, if
necessary, the timer in start_xact_command(). As that's done only for
Execute and not Parse / Bind, pipelining the latter two could still
cause undesirable timeouts. But a survey of protocol implementations
shows that all drivers issue Sync messages when preparing, and adding
timeout rearming to both is fairly expensive for the common parse /
bind / execute sequence.

Author: Tatsuo Ishii, editorialized by Andres Freund
Reviewed-By: Takayuki Tsunakawa, Andres Freund
Discussion: 4e6eab73bc89c6bf3bdc4514b4b00de670124dfb@sraoss.co.jp

xinzweb/gpdb,lisakowen/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,xinzweb/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,xinzweb/gpdb,adam8157/gpdb,lisakowen/gpdb,adam8157/gpdb,lisakowen/gpdb,xinzweb/gpdb,lisakowen/gpdb,xinzweb/gpdb,xinzweb/gpdb