Re: Add client connection check during the execution of the query
s.cherkashin@postgrespro.ru
From: s.cherkashin@postgrespro.ru
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2019-02-08T17:16:15Z
Lists: pgsql-hackers
Attachments
- Add_client_connection_check_v2.patch (text/x-diff) patch v2
The purpose of this patch is to stop the execution of continuous requests in case of a disconnection from the client. In most cases, the client must wait for a response from the server before sending new data - which means there should not remain unread data on the socket and we will be able to determine a broken connection. Perhaps exceptions are possible, but I could not think of such a use case (except COPY). I would be grateful if someone could offer such cases or their solutions. I added a test for the GUC variable when the client connects via SSL, but I'm not sure that this test is really necessary. Best regards, Sergey Cherkashin.
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