X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2B9C355BBC for ; Wed, 2 Mar 2005 23:24:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31101-07 for ; Wed, 2 Mar 2005 23:24:52 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id A5F1252D8A for ; Wed, 2 Mar 2005 23:24:50 +0000 (GMT) Received: (qmail 5932 invoked from network); 2 Mar 2005 23:23:56 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 2 Mar 2005 23:23:56 -0000 Message-ID: <42264B3F.4080409@fastcrypt.com> Date: Wed, 02 Mar 2005 18:24:47 -0500 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mican Bican Cc: pgsql-jdbc@postgresql.org Subject: Re: lock problem when dont commit References: <915cd3880503021437382b001e@mail.gmail.com> In-Reply-To: <915cd3880503021437382b001e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.042 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/23 X-Sequence-Number: 12416 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@postgresql.org > > > > -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561