Re: [BUGS] BUG #1459: Connection hangs when other connection is not

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: [BUGS] BUG #1459: Connection hangs when other connection is not
Дата
Msg-id 4203CE8D.1050301@opencloud.com
обсуждение исходный текст
Ответы Re: [BUGS] BUG #1459: Connection hangs when other connection is not  (Kris Jurka <books@ejurka.com>)
Список pgsql-jdbc
Peter Eisentraut wrote:
> Am Freitag, 4. Februar 2005 11:54 schrieb Rainer Frey:
>
>>Is there any possibility to set a timeout for the lock, after which the
>>ALTER TABLE statement fails, instead of remaining in wait status (when
>>calling with JDBC?
>
> Yes, there is a statement_timeout parameter or something like that.

JDBC has a couple of mechanisms that may be more portable than fiddling
with statement_timeout directly:

- Statement.setQueryTimeout(). This is *not* implemented by the current
driver (it is a no-op), but shouldn't be too hard to implement as
mapping to statement_timeout if you feel inclined to do some driver hacking.

- Statement.cancel(). This is implemented by the current driver, but you
will need to build your own infrastructure to handle doing the cancel
from a separate thread if a query takes too long.

-O

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: jar naming consitency
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: jar naming consitency