RE: Timeout parameters

From: MikalaiKeida(at)ibagroup(dot)eu
To: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(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>, "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>, "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>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: RE: Timeout parameters
Date: 2019-03-15 09:11:44
Message-ID: OFBFC3FA80.8323A78D-ON432583BE.00319AF7-432583BE.003283B8@iba.by
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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 queries should be handled
bystatement_timeout which indicates the maximum tolerable query execution
duration.
> For example, if the usually expected query execution time is 100 ms,
statement_timeout can be set to 3 seconds and socket_timeout to 5 seconds.

Based on your comment it seems to me that 'socket_timeout' should be
connected with statement_timeout. I mean that end-user should wait
statement_timeout + 'socket_timeout' for returning control. It looks much
more safer for me.

Best regards,
Mikalai Keida

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-03-15 09:35:14 Re: [HACKERS] generated columns
Previous Message Magnus Hagander 2019-03-15 09:01:32 Re: Offline enabling/disabling of data checksums