Re: Terminate query on page exit

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: patrick keshishian <pkeshish(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Terminate query on page exit
Date: 2013-02-19 19:07:19
Message-ID: CAFj8pRDnQ5Jb+6ad7etxDNme0gZO9K+DyCEessRGfLTU1A=VPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2013/2/19 Jeff Janes <jeff(dot)janes(at)gmail(dot)com>:
> On Tue, Feb 19, 2013 at 4:38 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> 2013/2/19 patrick keshishian <pkeshish(at)gmail(dot)com>:
>>> On Tuesday, February 19, 2013, Albe Laurenz wrote:
>>>>
>>>>
>>>> One crude method would be to set statement_timeout to a nonzero
>>>> value - then queries that take longer than that many seconds
>>>> will be canceled.
>>>
>>>
>>> you don't truly mean to advise that, do you? :)
>>
>> it is not bad advice - usually all long queries should be cancelled by
>> timeout - and timeout is the most simple and sometimes good enough
>> solution. You can set timeout just for account used for login from web
>> application
>
> It would be nice if a long running query could occasionally check to
> see if it still has somewhere to send the results it is computing.
> Rather than running for hours only to give a "could not send data to
> client: Broken pipe" as soon as the first row becomes available.
> client_alive_timeout?

it is not bad idea

Regards

Pavel

>
> Cheers,
>
> Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bastiaan Olij 2013-02-19 20:28:05 Re: Connection with server dropping out
Previous Message Jeff Janes 2013-02-19 18:44:27 Re: Terminate query on page exit