Re: revisiting transaction isolation

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: revisiting transaction isolation
Date: 2004-07-20 09:04:50
Message-ID: 40FCE032.30201@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Oliver Jowett wrote:

> A quick skim of AbstractJdbc2Connection turns up these methods as
> candidates for ignoring autocommit:
>
> - getTransactionIsolation()
> - getPGType (both versions) on a cache miss
>
> It seems reasonable to suppress BEGINs for both of those cases. I can
> put together a patch to do that. I'll leave the metadata queries alone
> for the moment.

And here is the patch.

I reworked execSQLQuery / execSQLUpdate to always ignore autocommit,
since all places they're called from want this behaviour. Also tweaked
them to detect unexpected cases (no resultset from query, resultset from
update).

-O

Attachment Content-Type Size
pgjdbc-isolation-ignores-autocommit.txt text/plain 12.9 KB

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2004-07-20 21:38:58 JDBC3 + HOLD_CURSORS_OVER_COMMIT
Previous Message Oliver Jowett 2004-07-20 06:24:41 Re: patch: ensure testdbencoding test table is dropped