Re: [GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Edoardo Panfili
Tom Lane wrote: Edoardo Panfili <[EMAIL PROTECTED]> writes: 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

Re: [GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Edoardo Panfili
Scott Marlowe wrote: On Fri, 2006-12-08 at 09:16, Edoardo Panfili wrote: I have a question regarding a strange behaviour (for me, maybe that this is desidered feature) of LOCK on tables. I am using postgres 8.2 I have a servlet that uses connection pools. The servlet do "LOCK table,table2,tabl

Re: [GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Scott Marlowe
On Fri, 2006-12-08 at 09:16, Edoardo Panfili wrote: > I have a question regarding a strange behaviour (for me, maybe that this > is desidered feature) of LOCK on tables. I am using postgres 8.2 > > I have a servlet that uses connection pools. > The servlet do "LOCK table,table2,table3,table4" > t

Re: [GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Tom Lane
Edoardo Panfili <[EMAIL PROTECTED]> writes: > 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 tes

Re: [GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Edoardo Panfili
Tom Lane wrote: Edoardo Panfili <[EMAIL PROTECTED]> 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

Re: [GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Tom Lane
Edoardo Panfili <[EMAIL PROTECTED]> 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 Connect

Re: [GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Edoardo Panfili
Tom Lane wrote: Edoardo Panfili <[EMAIL PROTECTED]> writes: I have a servlet that uses connection pools. The servlet do "LOCK table,table2,table3,table4" then do some select (I am testing the code, I will put the update in the future) an then I close instruction and connection. The first 4 exe

Re: [GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Tom Lane
Edoardo Panfili <[EMAIL PROTECTED]> writes: > I have a servlet that uses connection pools. > The servlet do "LOCK table,table2,table3,table4" > then do some select (I am testing the code, I will put the update in the > future) an then I close instruction and connection. > The first 4 executions of

[GENERAL] strange (maybe) behaviour of table lock

2006-12-08 Thread Edoardo Panfili
I have a question regarding a strange behaviour (for me, maybe that this is desidered feature) of LOCK on tables. I am using postgres 8.2 I have a servlet that uses connection pools. The servlet do "LOCK table,table2,table3,table4" then do some select (I am testing the code, I will put the updat