pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Problem restoring large objects with pg_restore 2+ messages / 2 participants [nested] [flat]
* Problem restoring large objects with pg_restore @ 2003-08-01 15:18 Chris White (cjwhite) <cjwhite@cisco.com> 2003-08-01 16:40 ` Re: Problem restoring large objects with pg_restore Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Chris White (cjwhite) @ 2003-08-01 15:18 UTC (permalink / raw) To: pgsql-admin I am running version 7.2.1 of postgres and I am trying to restore all the large objects and associated tables from a backup I took 3 days ago. I created a restore list using pg_restore -l restore.file > restore.list command. I then edited the restore list to only include those tables I needed. Then I restored the tables and large objects using the pg_restore -c -d database -U user -L restore list restore.file 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), which made all the references to these oids in the tables incorrect. What did I do wrong? Chris White ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Problem restoring large objects with pg_restore 2003-08-01 15:18 Problem restoring large objects with pg_restore Chris White (cjwhite) <cjwhite@cisco.com> @ 2003-08-01 16:40 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2003-08-01 16:40 UTC (permalink / raw) To: cjwhite@cisco.com; +Cc: pgsql-admin "Chris White (cjwhite)" <cjwhite@cisco.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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-08-01 16:40 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2003-08-01 15:18 Problem restoring large objects with pg_restore Chris White (cjwhite) <cjwhite@cisco.com> 2003-08-01 16:40 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox