RE: Timeout parameters - Mailing list pgsql-hackers

From Nagaura, Ryohei
Subject RE: Timeout parameters
Date
Msg-id EDA4195584F5064680D8130B1CA91C453B78A3@G01JPEXMBYT04
Whole thread Raw
In response to RE: Timeout parameters  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses RE: Timeout parameters
List pgsql-hackers
Hi,

On Tue, Dec 25, 2018 at 2:59 AM, Fabien COELHO wrote:
> >> 4. The client wants to close the connection while leaving the job to
> >> the server.
> >> In this case, "statement_timeout" can't satisfy at line 4.
>
> Why?
> ISTM that "leaving the job" to the server with a client-side connection
> closed is basically an abort, no different from what server-side
> "statement_timeout" already provides?
"while leaving the job to the server" means that "while the server continue the job".
# Sorry for the inappropriate explanation.
I understand that "statement_timeout" won't.

> Also, from a client perspective, if you use statement_timeout, it would
> timeout, then the client would process the error and the connection would
> be ready for the next query without needing to be re-created, which is quite
> costly anyway? Also, if the server is busy, recreating an connection is
> expensive so it won't help much, really?
When the recreating the connection the server may be not busy.
In this case, it isn't so costly to reconnect.
Also, if a client do not have to execute the remaining query immediately after timeout, 
the client will have the choice of waiting until the server is not busy.

> About the implementation, I'm wondering whether something simpler could
> be done. Check how psql implements "ctrl-c" to abort a running query: it
> seems that it sends a cancel message, no need to actually abort the
> connection?
This is my homework.

> Hmmm.... "client_statement_timeout" maybe?
I agree.

Best regards,
---------------------
Ryohei Nagaura




pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Progress reporting for pg_verify_checksums
Next
From: Alvaro Herrera
Date:
Subject: Re: Progress reporting for pg_verify_checksums