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

Reply via email to