Re: Can I adjust the oid counter for testing?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Can I adjust the oid counter for testing?
Date: 2002-06-17 14:00:04
Message-ID: 18622.1024322404@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> writes:
> I need to do some testing of pgAdmin on a database with very large oids
> (> 4,000,000,000). Is there anyway I can wind the oid counter forward
> without having to do a few billion inserts?
> I'm on a test system so I can initdb if required.

A clean solution would be to extend pg_resetxlog to have a switch to set
nextOid, parallel to its switch to tweak nextXid. (I had thought we had
this already, actually, but I'm not seeing it in current sources.)

The difficulty with that, if you are using current CVS, is that I
believe pg_resetxlog is broken at the moment --- Thomas changed the
format of pg_control recently and didn't update pg_resetxlog.

If you want to fix both of those things and submit a patch, it'd save me
some work that needs to get done before 7.3 can go out.

If that all seems like too much work, you could just reach in with a
debugger and set ShmemVariableCache->nextOid in a running system
(be careful that nothing is going on while you do so). Better set
ShmemVariableCache->oidCount = 0 while you're at it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-06-17 14:16:48 Re: FATAL 2: InitRelink(logfile 0 seg 173) failed: No such file or directory
Previous Message Tom Lane 2002-06-17 13:51:05 Re: [HACKERS] Native OLE DB. What do you think about it