Re: Cancelling Requests Frontend/Backend Protocol TCP/IP

From: Raimon Fernandez <coder(at)montx(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Cancelling Requests Frontend/Backend Protocol TCP/IP
Date: 2009-11-02 21:57:30
Message-ID: D33ABD2B-86FF-4FAA-B5C4-59C9C0E448AC@montx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces


On 02/11/2009, at 20:01, John DeSoi wrote:

>
> On Nov 2, 2009, at 12:17 PM, Raimon Fernandez wrote:
>
>> when postgres has finished processing the select, just before
>> sending the first row(1), in the middle(2), or at the end(3), when
>> the last row has been sent ?
>>
>> If I send the CancelRequest when postgres is in point 3, I'm too
>> late, but if postgres is in 1 or 2, the CancelRequest will have
>> some effect.
>>
>> I'm still wrong here ?
>>
>> thanks for clarification the concept!
>
> Yes, it will have some effect in cases 1 and 2. You will know it
> worked because you'll get error 57014 - canceling statement due to
> user request.
>
> An easy way to test this out is to call pg_sleep with a big number
> and then cancel the query on another connection. You won't have to
> worry about the timing of receiving all rows or not.

thanks!

Now I can Cancel them using the Front End or the pg_cancel_backend, I
had an error in my FrontEnd function, no is working ...

:-)

thanks for all,

regards,

raimon

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-11-02 22:21:10 Re: Help with postgresql memory issue
Previous Message Brooks Lyrette 2009-11-02 20:11:30 Re: Help with postgresql memory issue

Browse pgsql-interfaces by date

  From Date Subject
Next Message Mark Richardson 2009-11-11 18:38:31 Upgrading databases
Previous Message John DeSoi 2009-11-02 19:01:11 Re: Cancelling Requests Frontend/Backend Protocol TCP/IP