Re: commit problem

From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: "John R Pierce" <pierce(at)hogranch(dot)com>,pgsql-jdbc(at)postgresql(dot)org
Subject: Re: commit problem
Date: 2012-10-25 20:45:34
Message-ID: 20121025204534.306900@gmx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

John R Pierce wrote:

> my Java developers are telling me, the recent JDBC drivers are
> throwing an exception if they inadvertantly issue a commit() on an
> autocommit connection.

Which is what seems to be required by the API:

http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#commit%28%29

> My very-oracle-centric lead SQL developer is trying to use this as
> yet another excuse not to use Postgres as in his opinion, Oracle
> just 'does what you want'.

Or rather, whatever it wants, regardless of standards and API
definitions. An API currently published by... Oracle?

> Meanwhile, these random crashes that only show up under full
> production volume workloads (at our deployment sites in Asia) are
> freaking out the operations people, who ALSO are becoming afraid of
> Postgres.

Sounds ugly. What I wonder is why the your development team doesn't
route all transaction completions through a common method. I have
always seen that as the only sane way to do it. Then you have one
place where you can change:

   conn.commit();

to:

   if (conn.getAutoCommit() == false)
       conn.commit();

I would be afraid of developers who seem to be either unable to
manage development in a way that prevents such problems, or willing
to let preventable problems happen to try to "prove a point".  I hope
you have managers above this lead SQL developer who will ask him why
he hasn't made this work when so many other developers can do so. Is
he simply not as good as the developers at all these other companies
who solve such problems, or is he unwilling to do so?  Is there a 3rd
option there?

-Kevin

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message John R Pierce 2012-10-25 21:48:10 Re: commit problem
Previous Message Dave Cramer 2012-10-25 20:44:49 Re: commit problem