Re: max execution time of query

Поиск
Список
Период
Сортировка
От Chris
Тема Re: max execution time of query
Дата
Msg-id 4A28BB30.3080406@gmail.com
обсуждение исходный текст
Ответ на max execution time of query  (S Arvind <arvindwill@gmail.com>)
Ответы Re: max execution time of query  (S Arvind <arvindwill@gmail.com>)
Список pgsql-general
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/


В списке pgsql-general по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: max execution time of query
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: recursive execute