Re: max execution time of query

From: S Arvind <arvindwill(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: max execution time of query
Date: 2009-06-05 17:53:25
Message-ID: abf9211d0906051053h6925ec48t31d980d3a16d50c9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Chris & kretschmer. But one small doubt in it,, What happens to
update or insert query?

- Arvind S
*
"Many of lifes failure are people who did not realize how close they were to
success when they gave up."
-Thomas Edison
*

On Fri, Jun 5, 2009 at 11:59 AM, Chris <dmagick(at)gmail(dot)com> wrote:

> S Arvind wrote:
>
>> Is there any possibility to mention max time a query can execute from DBCP
>> side? our DB is Postgres and Container is tomcat 6. we dont want to give the
>> timeout in postgres for all query but need to set in application side based
>> on differnet needs? Is it possible?
>>
>> Is there anyother way to specify the query execution time out while
>> establishing connection with the help of DBCP in tomcat?
>>
>> Example, if a query executed from web application then it should not
>> execute more then 22mins. If it execute more then that means query shold be
>> cancelled from postgres(important) and java should get exception on this
>> event. Is it possible?
>>
>
> You can set statement_timeout per session.
>
> http://www.postgresql.org/docs/8.3/static/runtime-config-client.html
>
> Not sure what happens on the java side when the exec time is hit but the
> query is cancelled in postgres.
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jean Hoderd 2009-06-05 17:58:09 Re: NOT NULL with CREATE TYPE
Previous Message David 2009-06-05 17:44:31 Re: maintaining referential integrity