pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use WL_SOCKET_CLOSED for client_connection_check_interval.
Date: Mon, 14 Feb 2022 04:14:27 +0000
Message-ID: <E1nJSkt-0002c8-VD@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cba5b994c990bba8df9b8bb75f25ca40aef6b68b

Modified Files
--------------
doc/src/sgml/config.sgml     |  6 +++---
src/backend/libpq/pqcomm.c   | 46 ++++++++++++++++++++++----------------------
src/backend/utils/misc/guc.c |  7 ++-----
src/include/libpq/libpq.h    |  1 +
4 files changed, 29 insertions(+), 31 deletions(-)



Message-ID: <E1nJSkt-0002c8-VD@gemulon.postgresql.org>
Permalink:  ../E1nJSkt-0002c8-VD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1nJSkt-0002c8-VD@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Use WL_SOCKET_CLOSED for client_connection_check_interval.
  In-Reply-To: <E1nJSkt-0002c8-VD@gemulon.postgresql.org>
  References: <E1nJSkt-0002c8-VD@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox