pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: j.random.programmer <javadesigner@yahoo.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently
Date: Fri, 14 Jan 2005 15:01:42 -0800 (PST)
Message-ID: <20050114230142.69954.qmail@web14201.mail.yahoo.com> (raw)
In-Reply-To: <41E83BE1.2020909@opencloud.com>

Hi:

> fail. A subsequent 
> COMMIT will not actually commit; it will roll back.
> ...snip...
> it has been for ages. Don't ignore errors from your
> queries!

ok !

> It might be worthwhile having commit() throw an
> exception if the 
> transaction did not actually commit, rather than
> only reporting 
> server-generated errors. What do people think?

Yup. But if that's too much of a dirty hack, then an
alternative
is to put the current behavior in the JDBC FAQ section
located
at:

http://jdbc.postgresql.org/documentation/faq.html
 
> 
> 7.4 returns COMMIT for rolled-back COMMITs, but does
> report transactions 
> that have failed via the v3 protocol. 8.0 returns
> ROLLBACK for 
> rolled-back COMMITs and also uses the v3 protocol.
> So it should be 
> possible to detect this case for both 7.4 and 8.0
> reasonably easily.

Cool, then maybe the 8.x driver should do so. And the
current
driver's (or actually the postgres database's)
behavior can
be described in the FAQ ? I think that would be _very_
useful
for newbies who might otherwise be bit by this
behavior and/or
post the same question again and again to the mailing
list.

> Also in 8.0 and later, there is savepoint support
> that helps with this 
> case. The pattern to use is something like this:
> [....snip lots of info...]

Thanks for that additional info.

Best regards,

--j


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 



view thread (22+ messages)  latest in thread

Message-ID: <20050114230142.69954.qmail@web14201.mail.yahoo.com>
Permalink:  ../20050114230142.69954.qmail@web14201.mail.yahoo.com/
Also on:    postgresql.org/message-id/20050114230142.69954.qmail@web14201.mail.yahoo.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: javadesigner@yahoo.com, oliver@opencloud.com
  Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently
  In-Reply-To: <20050114230142.69954.qmail@web14201.mail.yahoo.com>
  References: <41E83BE1.2020909@opencloud.com> <20050114230142.69954.qmail@web14201.mail.yahoo.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