Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id A8C2564FCFC for ; Sat, 20 Dec 2008 00:02:20 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 11495-03 for ; Sat, 20 Dec 2008 00:02:18 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9ADF364FCDE for ; Sat, 20 Dec 2008 00:02:17 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mBK42G0d009563; Fri, 19 Dec 2008 23:02:16 -0500 (EST) To: "Lipker, Joseph" cc: "pgsql-admin@postgresql.org" Subject: Re: Migration \ OID question In-reply-to: References: Comments: In-reply-to "Lipker, Joseph" message dated "Fri, 19 Dec 2008 12:07:50 -0800" Date: Fri, 19 Dec 2008 23:02:16 -0500 Message-ID: <9562.1229745736@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/167 X-Sequence-Number: 31000 "Lipker, Joseph" 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