From: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | "MikalaiKeida(at)ibagroup(dot)eu" <MikalaiKeida(at)ibagroup(dot)eu>, "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> |
Subject: | RE: Timeout parameters |
Date: | 2019-02-22 01:03:19 |
Message-ID: | 0A3221C70F24FB45833433255569204D1FB9F49F@G01JPEXMBYT05 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: MikalaiKeida(at)ibagroup(dot)eu [mailto:MikalaiKeida(at)ibagroup(dot)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 other timeouts don't work (TCP keepalive, tcp user timeout, statement_timeout). Also, there's no reason to restrict this timeout 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, libpq sends 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_timeout is OK.
Regards
Takayuki Tsunakawa
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2019-02-22 01:12:51 | Re: [HACKERS] Restricting maximum keep segments by repslots |
Previous Message | Bruce Momjian | 2019-02-22 00:58:51 | Re: bgwriter_lru_maxpages limits in PG 10 sample conf |