Re: oids rollover?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Kalchev <daniel(at)digsys(dot)bg>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: oids rollover?
Date: 2002-06-25 00:40:46
Message-ID: 3059.1024965646@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniel Kalchev <daniel(at)digsys(dot)bg> writes:
> I have a problem with an 7.1.3 database that has probably overflowed
> the oid counter. The startup halts with these messages

> DEBUG: database system was interrupted at 2002-06-24 21:19:43 EEST
> DEBUG: CheckPoint record at (156, 1692817164)
> DEBUG: Redo record at (156, 1692775580); Undo record at (0, 0);
> Shutdown FALSE
> DEBUG: NextTransactionId: 859255800; NextOid: 7098
> FATAL 2: Invalid NextTransactionId/NextOid
> postmaster: Startup proc 4752 exited with status 512 - abort

Looks that way. This is fixed in 7.2, so you might want to think about
an update sometime soon.

> Can something be sone to recover the database?

You could modify contrib/pg_resetxlog to force a value at least 16384 into
the OID counter. Since the DB was evidently not shut down cleanly, I'd
counsel cutting out the xlog-reset function entirely; just make it read
the pg_control file, set a valid nextOid, update the CRC, and rewrite
pg_control.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-06-25 00:45:14 Re: SQL99, CREATE CAST, and initdb
Previous Message J. R. Nield 2002-06-25 00:28:00 Re: Index Scans become Seq Scans after VACUUM ANALYSE