Re: Max OID - Mailing list pgsql-novice

From Steve T
Subject Re: Max OID
Date
Msg-id 1224225035.3598.478.camel@localhost.localdomain
Whole thread Raw
In response to Re: Max OID  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Tom,
OK - so what I'm seeing dumping a database from 8.0.8 and restoring it under 8.1.10 isn't what I'd see if I dumped it and restored it all under the same release of 8.0.8?

If I dump and restore under 8.0.8 you would expect the OIDs to be reset? 
If I then do the same (ie dump and restore) under 8.1.10 the OIDs used would be preserved for where OIDS have been used? Does that also apply to to the pg_ system tables?

The reason for these questions is that I had a server crash and restored an 8.0.8 dump from the crashed server into an 8.0.8 instance on a backup server. I didn't initdb the instance on the backupserver before doing the restore and after the restore I had a problem with the OIDs being much higher for the same records on the backup than it was on the original.  The programming language I use then had a problem retrieving OID values > 2Billion (it always returned 2Billion exactly) - so the application had a problem. I got around that particular issue.
But I now want to revert the OIDs to a 'smaller' value - so I had hoped by dumping the database, initdb and restoring the DB (all under 8.0.8), that it would reset the OIDS down. Would that be the case?

On Thu, 2008-10-16 at 16:02 -0400, Tom Lane wrote:
Steve T <steve@retsol.co.uk> writes:
> If I have a set of large objects and I have a pointer on a table to that
> object, what happens to that pointer when the database is dumped and
> restored?

Nothing, if you're using a reasonably modern PG version (8.1 or later).
pg_dump preserves the OIDs of large objects.

In older versions dump/reload didn't preserve those OIDs, but instead
pg_dump attempted to update stored OIDs to match the new values.

			regards, tom lane



Steve Tucknott
ReTSol Ltd

DDI:         01323 488548

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Max OID
Next
From: Steve T
Date:
Subject: Re: Max OID