pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@mail.com>
To: John R Pierce <pierce@hogranch.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: commit problem
Date: Thu, 25 Oct 2012 16:45:34 -0400
Message-ID: <20121025204534.306900@gmx.com> (raw)

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




view thread (9+ messages)  latest in thread

Message-ID: <20121025204534.306900@gmx.com>
Permalink:  ../20121025204534.306900@gmx.com/
Also on:    postgresql.org/message-id/20121025204534.306900@gmx.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: kgrittn@mail.com, pierce@hogranch.com
  Subject: Re: commit problem
  In-Reply-To: <20121025204534.306900@gmx.com>
  References: <20121025204534.306900@gmx.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