RE: Timeout parameters

From: MikalaiKeida(at)ibagroup(dot)eu
To: "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>
Cc: "AYahorau(at)ibagroup(dot)eu" <AYahorau(at)ibagroup(dot)eu>, 'Fabien COELHO' <coelho(at)cri(dot)ensmp(dot)fr>, 'Michael Paquier' <michael(at)paquier(dot)xyz>, "Nagaura, Ryohei" <nagaura(dot)ryohei(at)jp(dot)fujitsu(dot)com>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
Subject: RE: Timeout parameters
Date: 2019-02-21 15:01:26
Message-ID: OFA1173E01.5FE69B1A-ON432583A8.004DD865-432583A8.005287D9@iba.by
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, all.

> tcp_socket_timeout (integer)
>
> Terminate and restart any session that has been idle for more than
> the specified number of milliseconds to prevent client from infinite
> waiting for server due to dead connection. This can be used both as
> a brute force global query timeout and detecting network problems.
> A value of zero (the default) turns this off.

I am not very familiar with the PostgreSQL source code. Nevertheless, the
main idea of this parameter is clear for me - closing a connection when
the PostgreSQL server does not response due to any reason. However, I have
not found in the discussion a reference that this parameter can be
applied to the TCP as well as to the UNIX-domain sockets. Moreover, this
parameter works out of communication layer. When we consider TCP
communication, the failover is covered by keep_alive and tpc_user_timeout
parameters.

According to it, we should not use 'tcp' prefix in this parameter name,
'socket' sub string is not suitable too.

'timeout' is OK.

This parameter works on the client side. So the word 'client' is a good
candidate for using in this parameter name.
This parameter affects only when we send a 'query' to the pg server.

Based on it, we can build a name for this parameter
'client_query_timeout'.

The suggested explanation of this parameter does not follow the aim of
integrating this parameter:

client_query_timeout

Specifies the number of seconds to prevent client from infinite waiting
for server acknowledge to the sent query due to dead connection. This can
be used both as a force global query timeout and network problems
detector. A value of zero (the default) turns this off.

Best regards,
Mikalai Keida

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-02-21 15:18:16 Re: libpq host/hostaddr/conninfo inconsistencies
Previous Message Pierre Ducroquet 2019-02-21 14:56:07 Re: Row Level Security − leakproof-ness and performance implications