RE: Timeout parameters - Mailing list pgsql-hackers

From MikalaiKeida@ibagroup.eu
Subject RE: Timeout parameters
Date
Msg-id OFA1173E01.5FE69B1A-ON432583A8.004DD865-432583A8.005287D9@iba.by
Whole thread Raw
In response to RE: Timeout parameters  ("Jamison, Kirk" <k.jamison@jp.fujitsu.com>)
Responses RE: Timeout parameters  ("Jamison, Kirk" <k.jamison@jp.fujitsu.com>)
RE: Timeout parameters  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List 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

pgsql-hackers by date:

Previous
From: Pierre Ducroquet
Date:
Subject: Re: Row Level Security − leakproof-ness and performance implications
Next
From: Fabien COELHO
Date:
Subject: Re: libpq host/hostaddr/conninfo inconsistencies