Re: Migration \ OID question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Lipker, Joseph" <Joseph(dot)Lipker(at)WRECO1(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Migration \ OID question
Date: 2008-12-20 04:02:16
Message-ID: 9562.1229745736@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Lipker, Joseph" <Joseph(dot)Lipker(at)WRECO1(dot)com> writes:
> The application I inherited relies upon the oid's for primary keys.

It'd be a good idea to move away from that.

> The question is, after reloading the 7.2 version into the 8.19 version, should the migrated database be starting with the 203199999 as last oid and then assign 203200000 as the next oid?

No.

> What I am concerned about is when the 8.1.9 version assigns an oid that already exists.

If you have a unique index on the table's OID column (as one would hope,
else it's not good for much) then 8.1 and up will avoid assigning
duplicate OIDs. There might be some performance glitches if you have
very long runs of consecutive OIDs in the same table, though.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message John Lister 2008-12-20 08:26:46 Re: Incomplete Startup Packet on startup and when pg_maintenance --analyze runs in cron
Previous Message Lipker, Joseph 2008-12-19 20:07:50 Migration \ OID question