Large object and pg_restore problem

From: Gregory Gimenez <gimenez(at)ibdm(dot)univ-mrs(dot)fr>
To: pgsql-general(at)postgresql(dot)org
Subject: Large object and pg_restore problem
Date: 2007-05-07 13:56:08
Message-ID: 463F2FF8.5090506@ibdm.univ-mrs.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear All,

We are using the postgreSQL version 8.0.7 and we are facing a problem
regarding the large object and pg_dump.

We are storing image data as OID type. We have developed a PHP
application on it and we can see those images properly.

The problem is when we dump the DB using the following command:
pg_dump -U user -h host -i -o -b -v -F c db_name -f file_name

We are then getting an error when we try to load it on the same host
using pg_restore as follow:

pg_restore -i -h host -p 5432 -U user -d db_name -v file_name

Here is the error we got:

pg_restore: [archiver] could not create large object 488676329
pg_restore: *** aborted because of error

So, we try to get rid of this particular image by first deleting the
picture row with this corresponding oid and then making a vaccumdb +
reindex to delete the reference in the pg_largeoject but still the
largeobject is there.

Do you have any advices how can I delete this record (can I do a simple
delete from pg_catalog.pg_largeobject or this will trigger other
problems?) or if there are some workarounds?

I thank you for your attention and I look forward to hearing from you.

Best regards,

Gregory

--

--
------------------------------------------------------------------
Gregory Gimenez.
Bioinformatics Software Engineer
Marcelle group
Institut de Biologie du Developpement de Marseille
Campus de Luminy Case 907
13288 Marseille Cedex 9
FRANCE
Tel. +33 (0)491 829 240
Fax +33 (0)491 820 682

Web: http://www.ibdm.univ-mrs.fr
------------------------------------------------------------------

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Silvela 2007-05-07 13:59:50 linux bug and lost rows
Previous Message Jonas Henriksen 2007-05-07 13:53:09 Slow query and indexes...