From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Philip Warner <pjw(at)rhyme(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: heap_create with OID? |
Date: | 2000-07-04 16:58:40 |
Message-ID: | 200007041658.MAA01557@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> > The way pg_dump sets the max oid is:
>
> > CREATE TABLE pgdump_oid (dummy int4);
> > COPY pgdump_oid WITH OIDS FROM stdin;
> > 1282249 0
> > \.
>
> > where 1282249 is the max oid you want to set.
>
> > It's pretty crude, but I assume effective.
>
> Ah, right. IIRC there is a check in COPY to set the OID counter to
> max(current OID counter, user-supplied OID). So you could use this
> technique to install all the BLOBs with the right OIDs, as long as
> you were careful to load them in OID order: just load another row
> into the temp table each time you need to advance the OID counter.
> Kinda klugy, but no backend changes needed.
>
> BTW I'd recommend making pgdump_oid a TEMP table, so that it'll go away
> by itself.
Done. Renamed pgdump_oid to pg_dump_oid too. We didn't have TEMPORARY
tables at the time I did this. The temporary allows multiple concurrent
loads because there is no table name conflict.
--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-07-04 16:59:17 | Re: Statistical aggregates |
Previous Message | The Hermit Hacker | 2000-07-04 16:54:15 | Re: [HACKERS] Re: Revised Copyright: is this more palatable? |