pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: pginfo <pginfo@t1.unisoftbg.com>
Cc: Barry Lind <blind@xythos.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: problem with transactions
Date: Mon, 10 May 2004 12:49:21 -0400
Message-ID: <1084207760.1541.67.camel@localhost.localdomain> (raw)
In-Reply-To: <409F9C46.9050906@t1.unisoftbg.com>
References: <409F6ED2.1050701@t1.unisoftbg.com>
	<409FA4CB.6070305@xythos.com>
	<409F9C46.9050906@t1.unisoftbg.com>

It is in the conf file, and then you need to restart postgres

DAve
On Mon, 2004-05-10 at 11:14, pginfo wrote:
> Barry Lind wrote:
> 
> > I would suggest that you turn on sql statement logging on your 
> > database server and see exactly what the jdbc driver is sending to the 
> > server.  I suspect this information will help you track down the problem.
> >
> > thanks,
> > --Barry
> >
> >
> > pginfo wrote:
> >
> >> Hi,
> >>
> >> We are using pg 7.4.2 + jdbc to connect to jboss.
> >>
> >> It looks that pg have problems with transactions and jdbc.
> >>
> >> My example:
> >>
> >> Connection con = ... I get connection to my db.
> >>
> >> con.setAutoCommit(false);    // begin transaction
> >>
> >> // do some inserts
> >>
> >> con.rollback(); // rollback
> >>
> >> After this code all is working very well.
> >> All inserts are rollbacked and so on.
> >>
> >> And now the second example:
> >>
> >> Connection con = ... I get connection to my db.
> >>
> >> con.setAutoCommit(false);    // begin transaction
> >>
> >> // do some inserts
> >>
> >> con.rollback(); // rollback
> >> con.setAutoCommit(true);    // set autocommit. We are using 
> >> connection pool and will to have clear connection.
> >>
> >> For my supprice the last example do not rollback any inserts !
> >> I do not see nothink bad in this code, and also it is working perfect 
> >> on oracle + jdbc and also MSSQL + jdbc.
> >>
> >> Pls., can some one check the situation and post the result.
> >>
> >> I tryed to insert sole sllep for 5 sec. before the last 
> >> con.setAutoCommit(true); , but it do not help.
> >>
> >> Is it bug into the jdbc or pg ?
> >>
> >> I tested it also with pg 7.4.1 and 7.4. and I have the same problem.
> >>
> >> regards,
> >> ivan.
> >>
> >>
> >> ---------------------------(end of broadcast)---------------------------
> >> TIP 8: explain analyze is your friend
> >
> >
> >
> >
> >
> How to do it?
> Will I need to recompile pg or I can set it up into conf-file?
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 
> 
> 
> !DSPAM:409fb0d2240831803312480!
> 
> 
-- 
Dave Cramer
519 939 0336
ICQ # 14675561




view thread (12+ messages)  latest in thread

Message-ID: <1084207760.1541.67.camel@localhost.localdomain>
Permalink:  ../1084207760.1541.67.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1084207760.1541.67.camel@localhost.localdomain

 · 

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, pginfo@t1.unisoftbg.com, blind@xythos.com
  Subject: Re: problem with transactions
  In-Reply-To: <1084207760.1541.67.camel@localhost.localdomain>
  References: <409F6ED2.1050701@t1.unisoftbg.com> <409FA4CB.6070305@xythos.com> <409F9C46.9050906@t1.unisoftbg.com> <1084207760.1541.67.camel@localhost.localdomain>

* 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