Re: restoring large objects

From: "Marion McKelvie" <marion(at)streamlet(dot)co(dot)uk>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: restoring large objects
Date: 2004-04-06 15:46:11
Message-ID: MPEMKONPODHGLICHEKEGCEIOCOAA.marion@streamlet.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tom

Many thanks - you're right, the references are stored (by the application
using the database) in a column of type text. That presumably means the
only way I can get a reliably restorable dump is by writing something
myself... or adding an extra duplicate column which is of type oid... or
something which somehow tracks the old and new ids... an interesting
challenge!

Regards,

Marion

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 06 April 2004 16:33
To: Marion McKelvie
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] restoring large objects

"Marion McKelvie" <marion(at)streamlet(dot)co(dot)uk> writes:
> I am running with 7.1.2 (I know it's old, but I don't have a lot of choice
> given the application running on it), and have dumped the database with
> the -b option. However, the restoration process generates new ids for the
> large objects which means the link between the data table referencing them
> and the content of pg_largeobject is lost.

pg_dump includes code in the dump that is supposed to update references
to match the new large object OIDs. Check into why that didn't work
for you. (One fairly likely possibility is that you stored the
references in the wrong type of column --- it has to be type "oid" or
"lo" or pg_dump won't think it needs updating.)

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Corey Edwards 2004-04-06 15:47:45 Re: Running Postgresql 7.4.2 on Windows 2000 with Cygwin !
Previous Message Tom Lane 2004-04-06 15:32:46 Re: restoring large objects