X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 643DF4762F6; Wed, 9 Apr 2003 15:20:18 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 2DF6E4762D7; Wed, 9 Apr 2003 15:20:17 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h39JKE2L009429; Wed, 9 Apr 2003 15:20:14 -0400 (EDT) To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 In-reply-to: <012f01c2feca$1a3ab860$ff926b80@amer.cisco.com> References: <012f01c2feca$1a3ab860$ff926b80@amer.cisco.com> Comments: In-reply-to "Chris White" message dated "Wed, 09 Apr 2003 11:59:08 -0700" Date: Wed, 09 Apr 2003 15:20:13 -0400 Message-ID: <9428.1049916013@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-29.3 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/159 X-Sequence-Number: 8314 "Chris White" writes: > Looking at our code further, the actual code writes the large object commits > it, opens the large object updates the header of the large object (first 58 > bytes) with some length info using seeks, then writes and commits the object > again, before updating and committing the associated tables. The data I saw > in the exported file was the header info without the updates for the length > info i.e. after the first commit!! Oh, that's interesting. I wonder whether you could be running into some variant of this issue: http://archives.postgresql.org/pgsql-hackers/2002-05/msg00875.php I looked a little bit at fixing this, but wasn't sure how to get the appropriate snapshot passed to the LO functions --- the global QuerySnapshot might not be the right thing, but then what is? Also, what if a transaction opens multiple LO handles for the same object --- should they be able to see each others' updates? (I'm not sure we could prevent it, so this may be moot.) BTW what do you mean exactly by "commit" above? There is no notion of committing a large object separately from committing a transaction. regards, tom lane