pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris White <cjwhite@cisco.com>
To: pgsql-jdbc@postgresql.org
To: pgsql-admin@postgresql.org
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> (raw)

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

view thread (17+ messages)  latest in thread

Message-ID: <000f01c2f9ff$0f9e6250$ff926b80@amer.cisco.com>
Permalink:  ../000f01c2f9ff$0f9e6250$ff926b80@amer.cisco.com/
Also on:    postgresql.org/message-id/000f01c2f9ff$0f9e6250$ff926b80@amer.cisco.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: cjwhite@cisco.com, pgsql-jdbc@postgresql.org
  Subject: Re: Problems with Large Objects using Postgres 7.2.1
  In-Reply-To: <000f01c2f9ff$0f9e6250$ff926b80@amer.cisco.com>
  References: <000f01c2f9ff$0f9e6250$ff926b80@amer.cisco.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox