This patch adds verification of the connection with the client during
the execution of the SQL query. The feature enables using the GUC
variable βclient_connection_check_intervalβ. The default check interval
is 1 second. If you set the value of βclient_connection_check_intervalβ
to 0, then the check will not be performed.
The feature will be useful in cases when, during the execution of a very
long query, the client suddenly terminates the connection - this will
allow backend to cancel further execution of the query and free server
resources.