Re: strange (maybe) behaviour of table lock

Поиск
Список
Период
Сортировка
От Edoardo Panfili
Тема Re: strange (maybe) behaviour of table lock
Дата
Msg-id 4579B9F8.2000401@aspix.it
обсуждение исходный текст
Ответ на Re: strange (maybe) behaviour of table lock  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: strange (maybe) behaviour of table lock  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> Edoardo Panfili <edoardo@aspix.it> writes:
>> It seems that if I put some delay between calls to the servlet all goes
>> well. I can change lock level but ther is something wrong.
>
>> Obviously I am doiung something wrong. To unlock the tables is not
>> sufficient close the Statement and the Connection?
>
> Um, possibly not, if you're using connection-pooling software ... and
> even if you're not, I think closing the connection is asynchronous;
> it'd be possible to establish a new connection before the old one has
> terminated and released its locks.
Tnaks again.


> Rather than closing the connection, I think you need to do something
> explicit to commit your transaction.
I use connection.commit();

I spend many time to explain the bahaviour of the system:

I some occasions the system use another connection to retrieve some
information during the main connection. This explain the hangs but...
why sometimes the system works.

I do more tests.

Thanks a lot again
Edoardo


--
edoardo@aspix.it
AIM: edoardopn
Jabber: edoardopa@talk.google.com
tel:075 9142766

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

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Re: Male/female
Следующее
От: Tom Lane
Дата:
Сообщение: Re: strange (maybe) behaviour of table lock