Re: pg_largeobject and oid mistmach after restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeremiah Jahn <jeremiah(at)cs(dot)earlham(dot)edu>
Cc: postgres list <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_largeobject and oid mistmach after restore
Date: 2004-01-26 20:03:17
Message-ID: 14440.1075147397@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeremiah Jahn <jeremiah(at)cs(dot)earlham(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2004-01-26 20:11:33 Re: OT: SCO Extortion
Previous Message Ezra Epstein 2004-01-26 19:59:14 Re: If table A value IS NULL then table B