Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 4500B9FB7DC for ; Tue, 24 Apr 2007 07:39:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 17202-02 for ; Tue, 24 Apr 2007 07:39:31 -0300 (ADT) X-Greylist: delayed 00:06:39.305027 by SQLgrey-1.7.4 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 99E409FB7DA for ; Tue, 24 Apr 2007 07:39:34 -0300 (ADT) Received: (qmail invoked by alias); 24 Apr 2007 10:32:51 -0000 Received: from office01.emerion.com (EHLO [127.0.0.1]) [83.64.50.26] by mail.gmx.net (mp047) with SMTP; 24 Apr 2007 12:32:51 +0200 X-Authenticated: #1946847 X-Provags-ID: V01U2FsdGVkX1+jIhwQDj2jRqgSC+KjpexsMTIKRpQySWWfT11lt2 hFGj58iCFMwHyY Message-ID: <462DDCCE.9050102@gmx.at> Date: Tue, 24 Apr 2007 12:32:46 +0200 From: Michael Paesold User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Tom Lane CC: Oliver Jowett , pgsql-jdbc@postgreSQL.org Subject: Re: JDBC feature request: auto savepoint per command References: <11539.1177352713@sss.pgh.pa.us> <462D44EE.9020602@opencloud.com> <17424.1177373126@sss.pgh.pa.us> In-Reply-To: <17424.1177373126@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/98 X-Sequence-Number: 16947 Tom Lane schrieb: > 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. Is it possible that they don't really understand that this is not about the JDBC driver at all, but just the way PostgreSQL works, no? So a driver option to do automatic save-pointing is the _only_ way to get the behavious they want, I guess. (Other than invasive backend hacking) > 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. If you look at the list archives, there were a number of people who did not expect this PostgreSQL-specific behavior (transaction rollback on statement error). I guess there will be many happy people if someone implements implicit savepoints in the JDBC driver. Best Regards Michael Paesold