By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,903 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,903 IT Pros & Developers. It's quick & easy.

pg_largeobject and oid mistmach after restore

P: n/a
when I run the following two commands all of my OIDs for my blobs (about
5.5 million of them) no longer reference anything in pg_largeobject.
All of the loid values change.

the relevant output from pg_restore:
pg_restore: restoring data for table "BLOBS"
pg_restore: connecting to database "copa" as user "copa"
pg_restore: creating table for large object cross-references
pg_restore: restored 5575606 large objects

pg_dump -F c -v -b -o -U copa copa > judici.pgsql

pg_restore -C -d template1 -F c -v -U copa < europa/judici.pgsql
thanx,
-jj-
--
Jeremiah Jahn <je******@cs.earlham.edu>
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jeremiah Jahn <je******@cs.earlham.edu> writes:
when I run the following two commands all of my OIDs for my blobs (about
5.5 million of them) no longer reference anything in pg_largeobject.
All of the loid values change.


pg_dump/pg_restore do not (and cannot) arrange for large objects to have
the same OIDs after restore as they had before. What they do try to do
is update references to the large objects to have the new OID values.
Last I checked, they look in columns of types "oid" and "lo" (if "lo"
exists) for such references. Maybe you were engaging in some type
punning, like storing your references in int4 or int8 columns?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 22 '05 #2

P: n/a
my column types are and have always been oid, but for some weird reason
when I dump and restore, I can't seem to reference my blobs anymore. I
have done this a zillion times, and just can't figure our what the heck
I'm doing wrong (this time).

On Mon, 2004-01-26 at 14:03, Tom Lane wrote:
Jeremiah Jahn <je******@cs.earlham.edu> writes:
when I run the following two commands all of my OIDs for my blobs (about
5.5 million of them) no longer reference anything in pg_largeobject.
All of the loid values change.


pg_dump/pg_restore do not (and cannot) arrange for large objects to have
the same OIDs after restore as they had before. What they do try to do
is update references to the large objects to have the new OID values.
Last I checked, they look in columns of types "oid" and "lo" (if "lo"
exists) for such references. Maybe you were engaging in some type
punning, like storing your references in int4 or int8 columns?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

--
Jeremiah Jahn <je******@cs.earlham.edu>
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.