Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 5949A9FB55A for ; Thu, 5 Jul 2007 11:54:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 94655-03 for ; Thu, 5 Jul 2007 11:54:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D087A9FB1B9 for ; Thu, 5 Jul 2007 11:54:11 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l65ErNZb011566; Thu, 5 Jul 2007 10:53:23 -0400 (EDT) To: "James Wilford" cc: pgsql-admin@postgresql.org Subject: Re: More than one pg_database entry for database In-reply-to: References: Comments: In-reply-to "James Wilford" message dated "Wed, 04 Jul 2007 09:25:50 +0100" Date: Thu, 05 Jul 2007 10:53:22 -0400 Message-ID: <11565.1183647202@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/39 X-Sequence-Number: 26020 "James Wilford" 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