Use WL_SOCKET_CLOSED for client_connection_check_interval.

Thomas Munro <tmunro@postgresql.org>

Commit: cba5b994c990bba8df9b8bb75f25ca40aef6b68b
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2022-02-14T03:52:23Z
Releases: 15.0
Use WL_SOCKET_CLOSED for client_connection_check_interval.

Previously we used poll() directly to check for a POLLRDHUP event.
Instead, use the WaitEventSet API to poll the socket for
WL_SOCKET_CLOSED, which knows how to detect this condition on many more
operating systems.

Reviewed-by: Zhihong Yu <zyu@yugabyte.com>
Reviewed-by: Maksim Milyutin <milyutinma@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/77def86b27e41f0efcba411460e929ae%40postgrespro.ru

Files

PathChange+/−
doc/src/sgml/config.sgml modified +3 −3
src/backend/libpq/pqcomm.c modified +23 −23
src/backend/utils/misc/guc.c modified +2 −5
src/include/libpq/libpq.h modified +1 −0

Documentation touched

Discussion