Re: More than one pg_database entry for database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "James Wilford" <jwilford(at)mistral(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: More than one pg_database entry for database
Date: 2007-07-05 14:53:22
Message-ID: 11565.1183647202@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"James Wilford" <jwilford(at)mistral(dot)net> writes:
> This shows 2 entries for "misp" with different OIDs. Only the first one
> (oid 31238435) exists in the data/base directory. So I tried to delete
> the other row but it doesn't work:

> misp=# DELETE from pg_database where oid = 6790290;
> DELETE 0

That's pretty strange. I wonder if the index on pg_database.oid is
corrupt. It certainly seems like the one on datname must be corrupt,
else it should have disallowed two such entries.

You could try deleting the bogus row by selecting it by ctid instead
of oid. Also see if you can REINDEX pg_database (this will only work
in standalone mode I think).

What PG version is this exactly?

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jessica Richard 2007-07-05 15:32:54 how to get a list of members of a postgres group?
Previous Message De Leeuw Guy 2007-07-05 14:48:31 Re: strange error