From: MikalaiKeida@ibagroup.eu [mailto:MikalaiKeida@ibagroup.eu]
> 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.
Right. This timeout is for individual socket operations, and the last resort to forcibly terminate the connection when
othertimeouts don't work (TCP keepalive, tcp user timeout, statement_timeout). Also, there's no reason to restrict
thistimeout to TCP.
> According to it, we should not use 'tcp' prefix in this parameter name,
> 'socket' sub string is not suitable too.
>
> 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.
No, this timeout works not only for queries but for any socket operations to communicate with the server. For example,
libpqsends query cancellation message to the server, receives server-side parameter value change notifications, etc.
So,like PgJDBC and Oracle, I think the name suggesting socket or communication is good. That is, socket_timeout or
communication_timeoutis OK.
Regards
Takayuki Tsunakawa