RE: Timeout parameters

2019-03-15 Thread MikalaiKeida
> Oops, unfortunately, PQcancel() does not follow any timeout parameters... It uses a blocking socket. > Also, I still don't think it's a good idea to request cancellation. socket_timeout should be sufficiently longer than the usually expected query execution duration. And long-running querie

RE: Timeout parameters

2019-03-15 Thread MikalaiKeida
Hello Takayuki-san, > Yes, so I think it would be necessary to describe how to set socket_timeout with relation to other timeout parameters -- socket_timeout > statement_timeout, emphasizing that socket_timeout is not for canceling long-running queries but for returning control to the client.

RE: Timeout parameters

2019-03-14 Thread MikalaiKeida
Hello, Takayuki. > > > For example, OS issues such as abnormally (buggy) slow process scheduling > > or paging/swapping that prevent control from being passed to postgres. Or, > > abnormally long waits on lwlocks in postgres. statement_timeout doesn't > > take effect while waiting on a lwlock

RE: Timeout parameters

2019-03-14 Thread MikalaiKeida
Hello, all. The main subject of discussion in this thread relates to the 'socket_timeout'. As I understand there is no any hesitation about applying TCP_USER_TIMEOUT into the PostgreSQL. We have been waiting for applying TCP_USER_TIMEOUT in PostgreSQL for about 6 moths. Fabien, I was wondering

RE: Timeout parameters

2019-03-12 Thread MikalaiKeida
Hello Nagaura-san. Thank you for your response. The main idea of my comment was to avoid handling logical errors ( "client-side timeout") in advance to the detection of network problems Therefore, I suggested setting "client-side timeout" greater of equal to the TCP_USER_TIMEOUT or note abo

RE: Timeout parameters

2019-03-11 Thread MikalaiKeida
Hello Ryohei-san, I understand the main aim of your suggestion that a client application has to do a lot of work except making quires to the database. I agree with you that "client-side timeout" has to be integrated into the PostgreSQL server and libpq. I'm with Fabien that "client-side timeout

RE: Timeout parameters

2019-02-21 Thread MikalaiKeida
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 d