Re: strange (maybe) behaviour of table lock

From: Edoardo Panfili <edoardo(at)aspix(dot)it>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: strange (maybe) behaviour of table lock
Date: 2006-12-08 19:16:08
Message-ID: 4579B9F8.2000401@aspix.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Edoardo Panfili <edoardo(at)aspix(dot)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(at)aspix(dot)it
AIM: edoardopn
Jabber: edoardopa(at)talk(dot)google(dot)com
tel:075 9142766

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-12-08 19:22:38 Re: strange (maybe) behaviour of table lock
Previous Message Ron Johnson 2006-12-08 19:12:39 Re: Re: Male/female