Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6386B9FB7EC for ; Mon, 23 Apr 2007 21:05:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 16684-04 for ; Mon, 23 Apr 2007 21:05:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 373379FB603 for ; Mon, 23 Apr 2007 21:05:35 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l3O05QSs017425; Mon, 23 Apr 2007 20:05:26 -0400 (EDT) To: Oliver Jowett cc: pgsql-jdbc@postgreSQL.org Subject: Re: JDBC feature request: auto savepoint per command In-reply-to: <462D44EE.9020602@opencloud.com> References: <11539.1177352713@sss.pgh.pa.us> <462D44EE.9020602@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Tue, 24 Apr 2007 11:44:46 +1200" Date: Mon, 23 Apr 2007 20:05:26 -0400 Message-ID: <17424.1177373126@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/94 X-Sequence-Number: 16943 Oliver Jowett writes: > They seem to be confusing rollback and commit of the managed transaction > with use of savepoints.. I don't see why the prohibition on messing with > the top-level global transaction affects use of savepoints, since use of > savepoints won't affect that top-level transaction? I got some further comments later in the day, which might mean more to you than they do to me: > In this particular case, the client wants the best of both worlds. > They are using straight JDBC, but they also want to use CMT. In > essence they want to execute JDBC interactions in a non-atomic manner > only committing the *global* transaction on completion. While Oracle, > DB2 etc support this, the savepoint commit()/rollback() issue with > the PG driver makes this all but impossible given the current code > base. Effectively the underlying JDBC transaction gets terminated on > statement failure requiring an explicit savepoint and rollback to > return the connection to a usable state which again, when using CMT > is not valid because the connection is still enlisted within a global > transaction. I'm honestly not sure how much of this is "it really would violate some spec or other" versus "we don't feel like putting in a special case". But the bottom line is they'd like us to act like all the other databases they support on this point. regards, tom lane