X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 082FF3A4243 for ; Mon, 25 Oct 2004 23:50:48 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12693-05 for ; Mon, 25 Oct 2004 22:50:39 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id AE7483A3AC2 for ; Mon, 25 Oct 2004 23:50:40 +0100 (BST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1CMDff-0007B4-00; Tue, 26 Oct 2004 11:50:35 +1300 Message-ID: <417D834F.40203@opencloud.com> Date: Tue, 26 Oct 2004 11:50:55 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.8 (X11/20041021) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: pgsql-jdbc@postgresql.org Subject: Re: Problems with protocol V3 after migration to latest driver References: <8BCBF9DB739F034B87FE7C7D30EAE55C026AC203@hqex2k.francoudi.com> <417CC468.7030704@opencloud.com> In-Reply-To: X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/266 X-Sequence-Number: 11371 Kris Jurka wrote: > > On Mon, 25 Oct 2004, Oliver Jowett wrote: > > >>Sounds like that is (another) bug .. it should be using the >>QUERY_SUPPRESS_BEGIN flag for driver-generated queries to avoid starting >>a transaction accidentally. I fixed that in various other places but >>didn't think to check the LO code. > > > This might be a little tricky as the large object code uses just the > public java.sql.* api. This situation is somewhat analogous to the > DatabaseMetaData calls that we decided should start transactions. In any > case I'm not sure it really matters. The only time the largeobject api > is initialized when a query won't immediately follow is if they are using > the LargeObjectManeger directly and not through the compatible=7.1 or > getBlob. I'm not entirely convinced. The DBMD queries are a direct result of an application call. It's reasonable to expect transactional isolation of metadata since you might be executing DDL that affects that metadata. We don't cache the results. In contrast, the LO stuff is one-off lazy initialization that is a side-effect of using the LO interface for the first time. The results are cached. We don't care about transactional isolation of the queries (or cache invalidation) as we are not expecting the LO function definitions to change under us. It seems like the same scenario as when we are filling the datatype<->OID caches in the main driver. That said, as you say it only makes a difference if you're using the LO manager directly, so maybe this isn't so important. -O