Skip site navigation (1) Skip section navigation (2)

Restoring Backup With OIDs As Primary Key

From: "Ben C" <ben(dot)c(at)ect(dot)com(dot)au>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Restoring Backup With OIDs As Primary Key
Date: 2008-08-26 03:30:23
Message-ID: 7DA06115D1591D41A33328B737C1F4122F309E@svrect1.ect.local (view raw, whole thread or download thread mbox)
Lists: pgsql-admin

I am trying to restore from a backup db that used oids as primary keys * ... when I do this the max oid value in the new database is around the 1700 mark where as the database I am pulling in is around 20,000,000 . which means any new data added to the dataabse is going to be clobbered.

Is there a way to increment the OID by changing a value in the system tables? 

thanks in advance

* at the time this was implemented way back at 7.x, from what I had read it seemed like acceptable practice :/


pgsql-admin by date

Next:From: Vishal AroraDate: 2008-08-26 04:18:02
Subject: Re: Regarding access to a user
Previous:From: Alvaro HerreraDate: 2008-08-26 02:34:06
Subject: Re: restoring from dump

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group