Hi all.
I found that connect_timeout uses pqWaitTimed().
Socket_timeout is related to pqWait() not pqWaitTimed().
Thus, I removed connect_timeout in my socket_Timeout patch.
FYI, I summarized a use case of this parameter.
The connection is built successfully.
Suppose that the server is hit by some kind of accident(e,g,. I or Tsunakawa-san suggested).
At this time, there is no guarantee that the server OS can pass control to the postmaster.
Therefore, it is considered natural way to disconnect the connection from the client side.
The place of implement of disconnection is pqWait() because it is where users' infinite wait occurs.
Best regards,
---------------------
Ryohei Nagaura