Re: [GENERAL] PQcancel may hang in the recv call

2016-05-20 Thread Peter Juhasz
On Thu, 2016-05-19 at 15:32 -0400, Tom Lane wrote: > Peter Juhasz writes: > > > > We've found a situation where canceling a query may cause the > > client to > > hang, possibly indefinitely. This can happen if the network > > connection > > fails in a specific way. > > ... > > However, if the net

Re: [GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread Tom Lane
"David G. Johnston" writes: > On Thu, May 19, 2016 at 3:32 PM, Tom Lane wrote: >> I do not recall anyone ever reporting something similar --- and that code >> has been like that for a long time. > ​I'd take Tom's word over mine :)​ Well, my memory is often faulty ;-). But I did trawl the P

Re: [GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread David G. Johnston
On Thu, May 19, 2016 at 3:32 PM, Tom Lane wrote: > Peter Juhasz writes: > > > Is this known? > > I do not recall anyone ever reporting something similar --- and that code > has been like that for a long time. > > ​I'd take Tom's word over mine :)​ ​David J.​

Re: [GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread Tom Lane
Peter Juhasz writes: > We've found a situation where canceling a query may cause the client to > hang, possibly indefinitely. This can happen if the network connection > fails in a specific way. > ... > However, if the network fails in a way that the connection appears to > have been established b

Re: [GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread David G. Johnston
On Thu, May 19, 2016 at 10:37 AM, Peter Juhasz wrote: > Hi all, > > this is somewhat involved so please bear with me. > > We've found a situation where canceling a query may cause the client to > hang, possibly indefinitely. This can happen if the network connection > fails in a specific way. > >

[GENERAL] PQcancel may hang in the recv call

2016-05-19 Thread Peter Juhasz
Hi all, this is somewhat involved so please bear with me. We've found a situation where canceling a query may cause the client to hang, possibly indefinitely. This can happen if the network connection fails in a specific way. The reason for this lies in the way the PQcancel function (which event