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

Re: V7.0 Error: OID ##### no longer exists in pg_databas e

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Barnes, Sandy (Sandra)" <Sandy(dot)Barnes(at)Honeywell(dot)com>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: V7.0 Error: OID ##### no longer exists in pg_databas e
Date: 2001-01-03 20:56:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
"Barnes, Sandy (Sandra)" <Sandy(dot)Barnes(at)Honeywell(dot)com> writes:
>> Any ideas on why this error would occur after dropping an existing
>> database and than re-creating it (createdb)?

I assume what you're really talking about is
	Database 'xxx', OID nnn, has disappeared from pg_database

It's theoretically possible for that to happen if, say, a CREATE
DATABASE or DROP DATABASE failed and was rolled back part way through.
I've never heard of it happening in normal usage, though.  If you
have a reproducible way of creating this situation I'd like to know
what it is.

>> The only work around so far
>> is to completely destroy the postgres instance and start over.

Vacuuming pg_database should fix it.  The problem is that backend
startup is seizing on a dead pg_database tuple to tell it the OID
of the target database; vacuum out the dead tuples and you'll be OK.

			regards, tom lane

PS: Memo to folks reporting problems: PLEASE quote any error message
you may be getting EXACTLY.  It's a lot easier to look at the related
code if we can just grep for the message...

In response to

pgsql-hackers by date

Next:From: Philip WarnerDate: 2001-01-04 03:01:03
Subject: Re: Please review TODO list
Previous:From: Barnes, Sandy (Sandra)Date: 2001-01-03 20:23:57
Subject: V7.0 Error: OID ##### no longer exists in pg_database

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