Re: pg_largeobject related issue with 9.2 - Mailing list pgsql-general

From Kevin Grittner
Subject Re: pg_largeobject related issue with 9.2
Date
Msg-id 1388777091.79457.YahooMailNeo@web122305.mail.ne1.yahoo.com
Whole thread Raw
In response to pg_largeobject related issue with 9.2  (sramay <nic.srama@gmail.com>)
Responses Re: pg_largeobject related issue with 9.2
List pgsql-general
sramay <nic.srama@gmail.com> wrote:

> I am having a application which was running on Jboss 5 with
> Hibernate and PostgreSQL 9.2.  Due to media corruption.  Data
> without largeobject was restored  and largeobject I restored from
> some other source.
>
> Now the application is giving error  eventhough largeobject is
> present it is giving error.  Can any help me?

> ERROR: large object 141066 does not exist*

It appears that you restored the large objects from a different
point in the series of commits than the rest of the database, and
you therefore have object IDs for large objects that don't exist.

Either you need to modify your software to deal with that situation
more gracefully, or you need to identify where you have a mismatch
and fix your data.  You might try a set of queries something like:

SELECT * FROM tabname t
  WHERE NOT EXISTS
    (SELECT * FROM pg_largeobject o WHERE o.loid = t.colname);

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-general by date:

Previous
From: Moshe Jacobson
Date:
Subject: Suddenly all tables were gone
Next
From: Tom Lane
Date:
Subject: Re: Suddenly all tables were gone