aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-int.h
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2019-04-06 15:23:37 +0900
committerMichael Paquier <michael@paquier.xyz>2019-04-06 15:23:37 +0900
commit249d64999615802752940e017ee5166e726bc7cd (patch)
tree0e66ac1723a854999e136e0c8cb3c3c4442b589d /src/interfaces/libpq/libpq-int.h
parent959d00e9dbe4cfcf4a63bb655ac2c29a5e579246 (diff)
downloadpostgresql-249d64999615802752940e017ee5166e726bc7cd.tar.gz
postgresql-249d64999615802752940e017ee5166e726bc7cd.zip
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
Diffstat (limited to 'src/interfaces/libpq/libpq-int.h')
-rw-r--r--src/interfaces/libpq/libpq-int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index 84222f2c7ca..1221ea9eefa 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -336,6 +336,7 @@ struct pg_conn
char *pgtty; /* tty on which the backend messages is
* displayed (OBSOLETE, NOT USED) */
char *connect_timeout; /* connection timeout (numeric string) */
+ char *pgtcp_user_timeout; /* tcp user timeout (numeric string) */
char *client_encoding_initial; /* encoding to use */
char *pgoptions; /* options to start the backend with */
char *appname; /* application name */