Re: Problem restoring large objects with pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cjwhite(at)cisco(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Problem restoring large objects with pg_restore
Date: 2003-08-01 16:40:18
Message-ID: 16199.1059756018@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Chris White (cjwhite)" <cjwhite(at)cisco(dot)com> writes:
> Everything got restored, all the requested tables and all the large
> objects. However, all the large objects were restored with a different
> oids (some using oids of previous large objects),

That's what's expected to happen. There is no way for pg_restore to
force them to have the same OIDs as before.

> which made all the
> references to these oids in the tables incorrect.

pg_restore is supposed to take care of updating references to restored
large objects. Perhaps you were storing the references as the wrong
datatype (not OID or LO)? Or perhaps you tried to do the restore in
multiple pg_restore runs? I'm not certain, but I think pg_restore
may only look at tables restored in the current run for references to
update. For sure it can't fix tables you haven't restored yet.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-08-01 16:48:35 Re: Smaller template database?
Previous Message Mendola Gaetano 2003-08-01 15:49:11 Re: Wrong plan or what ?