X-Original-To: pgsql-admin@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 37194474E4F; Thu, 3 Apr 2003 11:35:38 -0500 (EST) Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by postgresql.org (Postfix) with ESMTP id 5456D474E44; Thu, 3 Apr 2003 11:35:37 -0500 (EST) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-core-1.cisco.com (8.12.6/8.12.6) with ESMTP id h33GZemr018855; Thu, 3 Apr 2003 08:35:40 -0800 (PST) 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.2.1-GA) with ESMTP id ACW89133; Thu, 3 Apr 2003 08:35:39 -0800 (PST) Reply-To: From: "Chris White" To: , Subject: Problems with Large Objects using Postgres 7.2.1 Date: Thu, 3 Apr 2003 08:35:36 -0800 Message-ID: <000f01c2f9ff$0f9e6250$ff926b80@amer.cisco.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0010_01C2F9BC.017B2250" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Status: No, hits=-1.5 required=5.0 tests=BAYES_20,HTML_20_30 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/38 X-Sequence-Number: 8193 This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C2F9BC.017B2250 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I have a Java application which writes large objects to the database using the JDBC interface. The application reads binary input from an input stream and writes large objects to the database in 8K chunks and calculates the length of the data. At the end of the input stream it closes the large object and commits the large object and then updates associated tables with the large object id and large object length and commits that info to the database. The application has multiple threads (max 8) simultaneously writing these large objects each using their own connection. Whenever the system has a problem we have a monitor application which detects a need for a system shutdown and shuts down Postgres using a smart shutdown. What I am seeing is that when all 8 threads are running and the system is shutdown, large objects committed in transactions near to the shutdown are corrupt when the database is restarted. I know the large objects are committed, because the associated entries in the tables which point to the large objects are present after the restart with valid information about the large object length and oid. However when I access the large objects I am only returned a 2K chunk even though the table entry tells me the entry should be 320K. Anybody have any ideas what is the problem? Are there any know issues with the recovery of large objects? Chris White ------=_NextPart_000_0010_01C2F9BC.017B2250 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I have a = Java=20 application which writes large objects to the database using the JDBC inter= face.=20 The application reads binary input from an input stream and writes lar= ge=20 objects to the database in 8K chunks and calculates the length of the data.= At=20 the end of the input stream it closes the large object and commit= s the=20 large object and then updates associated tables with the large object id an= d=20 large object length and commits that info to the database. The application = has=20 multiple threads (max 8)  simultaneously writing these large obje= cts=20 each using their own connection. Whenever the system has a problem we have = a=20 monitor application which detects a need for a system shutdown and shuts do= wn=20 Postgres using a smart shutdown.
 
What I am= seeing is=20 that when all 8 threads are running and the system is shutdown, large= =20 objects committed in transactions near to the shutdown are corrupt when the= =20 database is restarted. I know the large objects are committed, because the= =20 associated entries in the tables which point to the large objects are prese= nt=20 after the restart with valid information about the large object length and = oid.=20 However when I access the large objects I am only returned a 2K chunk even= =20 though the table entry tells me the entry should be 320K.
 
Anybody h= ave any=20 ideas what is the problem? Are there any know issues with the recovery of l= arge=20 objects?
 
Chris=20 White
------=_NextPart_000_0010_01C2F9BC.017B2250--