From: | "Nagaura, Ryohei" <nagaura(dot)ryohei(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | 'Fabien COELHO' <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>, "AYahorau(at)ibagroup(dot)eu" <AYahorau(at)ibagroup(dot)eu> |
Subject: | RE: Timeout parameters |
Date: | 2018-12-26 02:20:43 |
Message-ID: | EDA4195584F5064680D8130B1CA91C453B78A3@G01JPEXMBYT04 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2018-12-26 02:45:09 | Re: Progress reporting for pg_verify_checksums |
Previous Message | Michael Paquier | 2018-12-26 02:14:00 | Re: Progress reporting for pg_verify_checksums |