X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 68383476237; Wed, 9 Apr 2003 16:23:06 -0400 (EDT) Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by postgresql.org (Postfix) with ESMTP id 5BB054761BC; Wed, 9 Apr 2003 16:23:05 -0400 (EDT) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-5.cisco.com (8.12.6/8.12.6) with ESMTP id h39KMhGO017924; Wed, 9 Apr 2003 13:22:55 -0700 (PDT) Received: from CJWHITEW2K2 (dhcp-128-107-146-255.cisco.com [128.107.146.255]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.3.3-GR) with ESMTP id ADB74829; Wed, 9 Apr 2003 13:22:43 -0700 (PDT) Reply-To: From: "Chris White" To: "'Tom Lane'" Cc: , Subject: Re: [JDBC] Problems with Large Objects using Postgres 7.2.1 Date: Wed, 9 Apr 2003 13:22:42 -0700 Message-ID: <013101c2fed5$c6b8e390$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <9428.1049916013@sss.pgh.pa.us> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-18.5 required=5.0 tests=BAYES_10,IN_REP_TO,ORIGINAL_MESSAGE,QUOTED_EMAIL_TEXT 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/162 X-Sequence-Number: 8317 See inline ***CJW*** -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org]On Behalf Of Tom Lane Sent: Wednesday, April 09, 2003 12:20 PM To: cjwhite@cisco.com Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [JDBC] [ADMIN] Problems with Large Objects using Postgres 7.2.1 >"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.) ***CJW*** Nobody can knows about these large objects until the associated table with large object info is committed to the database, which is after the header info has been updated. So nobody will be reading them while they are being updated. The problem seems to be after the restart of the database after a smart shutdown, when we are having issues with reading the large objects. ***CJW*** >BTW what do you mean exactly by "commit" above? There is no notion of >committing a large object separately from committing a transaction. ***CJW*** I meant committing the transaction. The first transaction commit is after the large object is written and closed. Second is after the large object update and close. Then the third is after the associated tables are updated. ***CJW*** > regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html