Re: pg_largeobject related issue with 9.2

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: sramay <nic(dot)srama(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_largeobject related issue with 9.2
Date: 2014-01-03 19:24:51
Message-ID: 1388777091.79457.YahooMailNeo@web122305.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

sramay <nic(dot)srama(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2014-01-03 19:42:36 Re: Suddenly all tables were gone
Previous Message Moshe Jacobson 2014-01-03 19:20:28 Suddenly all tables were gone