"Barnes, Sandy (Sandra)" <Sandy.Barnes@Honeywell.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 isDatabase '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...