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