pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Mican Bican <mican58@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: lock problem when dont commit
Date: Wed, 02 Mar 2005 18:24:47 -0500
Message-ID: <42264B3F.4080409@fastcrypt.com> (raw)
In-Reply-To: <915cd3880503021437382b001e@mail.gmail.com>
References: <915cd3880503021437382b001e@mail.gmail.com>

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




view thread (7+ messages)  latest in thread

Message-ID: <42264B3F.4080409@fastcrypt.com>
Permalink:  ../42264B3F.4080409@fastcrypt.com/
Also on:    postgresql.org/message-id/42264B3F.4080409@fastcrypt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg@fastcrypt.com, mican58@gmail.com
  Subject: Re: lock problem when dont commit
  In-Reply-To: <42264B3F.4080409@fastcrypt.com>
  References: <915cd3880503021437382b001e@mail.gmail.com> <42264B3F.4080409@fastcrypt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox