From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | Mican Bican <mican58(at)gmail(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: lock problem when dont commit |
Date: | 2005-03-02 23:24:47 |
Message-ID: | 42264B3F.4080409@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
There must be something else going on here. There is no lock on an
insert. Are you doing a select for update ?
Dave
Mican Bican wrote:
>Hello
>
>I use postgresql 8.0.1 under windows and jdbc3 with new java tiger...
>
>i work on a database with manuel commits and rollback..
>
>my problem is when 2 people work in on the same time on the database:
>
>---table liefAdress-------------
>
>pseudecode
>
>client1:
>...
>conn.setAutoCommit(false)
>insert into liefAdress(adress,postcode)
>//id is autoincrement
>insert into liefAdress(adress2,postcode2)
>....
>
>client2:
>insert into liefAdress(adress3,postcode3)
>
>--->here is the problem user1 dont commit his
>transactions.. the client software are locked..
>you can do nothing in the programm..!!
>
>client1:
>conn.commit()
>//all the adresses are inserted
>
>client2:
>the adress is also inserted and the
>java clientsoftware is unlocked...!
>
>
>my question is why the java programm from client2 is locked???
>can I say to the connection "when you must wait for the commit of the
>other users
>bring me a warning" or why the row from client2 are not inserted???? I
>dont lock everything.. must i change the transaction mode?? I use the
>default transaction mode..
>
>thank you for your answers!!!
>
>
>Mican Bican
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>
>
>
--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-03-02 23:39:56 | Re: lock problem when dont commit |
Previous Message | Mican Bican | 2005-03-02 22:37:47 | lock problem when dont commit |