Re: commit problem

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: commit problem
Дата
Msg-id 20121025204534.306900@gmx.com
обсуждение исходный текст
Ответ на commit problem  (John R Pierce <pierce@hogranch.com>)
Ответы Re: commit problem  (John R Pierce <pierce@hogranch.com>)
Список 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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: commit problem
Следующее
От: John R Pierce
Дата:
Сообщение: Re: commit problem