Add client connection check during the execution of the query
s.cherkashin@postgrespro.ru
From: s.cherkashin@postgrespro.ru
To: pgsql-hackers@postgresql.org
Date: 2018-11-19T15:22:42Z
Lists: pgsql-hackers
Attachments
- Add_client_connection_check.patch (text/x-diff) patch
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.
Commits
-
Add WL_SOCKET_CLOSED for socket shutdown events.
- 50e570a59e7f 15.0 landed
-
Use WL_SOCKET_CLOSED for client_connection_check_interval.
- cba5b994c990 15.0 landed
-
Detect POLLHUP/POLLRDHUP while running queries.
- c30f54ad732c 14.0 landed
-
Improve timeout.c's handling of repeated timeout set/cancel.
- 09cf1d522676 14.0 cited