pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add support TCP user timeout in libpq and the backend server
Date: Sat, 06 Apr 2019 06:43:35 +0000
Message-ID: <E1hCf39-0000wm-TJ@gemulon.postgresql.org> (raw)

Add support TCP user timeout in libpq and the backend server

Similarly to the set of parameters for keepalive, a connection parameter
for libpq is added as well as a backend GUC, called tcp_user_timeout.

Increasing the TCP user timeout is useful to allow a connection to
survive extended periods without end-to-end connection, and decreasing
it allows application to fail faster.  By default, the parameter is 0,
which makes the connection use the system default, and follows a logic
close to the keepalive parameters in its handling.  When connecting
through a Unix-socket domain, the parameters have no effect.

Author: Ryohei Nagaura
Reviewed-by: Fabien Coelho, Robert Haas, Kyotaro Horiguchi, Kirk
Jamison, Mikalai Keida, Takayuki Tsunakawa, Andrei Yahorau
Discussion: https://postgr.es/m/EDA4195584F5064680D8130B1CA91C45367328@G01JPEXMBYT04

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/249d64999615802752940e017ee5166e726bc7cd

Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out |  1 +
contrib/postgres_fdw/sql/postgres_fdw.sql      |  1 +
doc/src/sgml/config.sgml                       | 25 +++++++++
doc/src/sgml/libpq.sgml                        | 14 +++++
src/backend/libpq/pqcomm.c                     | 73 ++++++++++++++++++++++++++
src/backend/utils/misc/guc.c                   | 31 +++++++++++
src/backend/utils/misc/postgresql.conf.sample  |  4 +-
src/include/libpq/libpq-be.h                   |  6 ++-
src/include/utils/guc.h                        |  1 +
src/interfaces/libpq/fe-connect.c              | 43 +++++++++++++++
src/interfaces/libpq/libpq-int.h               |  1 +
11 files changed, 198 insertions(+), 2 deletions(-)



Message-ID: <E1hCf39-0000wm-TJ@gemulon.postgresql.org>
Permalink:  ../E1hCf39-0000wm-TJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hCf39-0000wm-TJ@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: michael@paquier.xyz
  Subject: Re: pgsql: Add support TCP user timeout in libpq and the backend server
  In-Reply-To: <E1hCf39-0000wm-TJ@gemulon.postgresql.org>
  References: <E1hCf39-0000wm-TJ@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