Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 74BF09FB1CC for ; Thu, 5 Jul 2007 13:26:51 -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 20992-09 for ; Thu, 5 Jul 2007 13:26:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 491069FB1EB for ; Thu, 5 Jul 2007 13:26:47 -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 l65GQips018570; Thu, 5 Jul 2007 12:26:44 -0400 (EDT) To: "James Wilford" cc: pgsql-admin@postgresql.org Subject: Re: More than one pg_database entry for database In-reply-to: References: <11565.1183647202@sss.pgh.pa.us> Comments: In-reply-to "James Wilford" message dated "Thu, 05 Jul 2007 17:16:39 +0100" Date: Thu, 05 Jul 2007 12:26:44 -0400 Message-ID: <18569.1183652804@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/41 X-Sequence-Number: 26022 "James Wilford" writes: > Its PG version 7.3. Please tell us it's a relatively recent 7.3.x, at least ... > I've just tried all your suggestions and > unfortunately I still can't delete the bogus row. I think I managed to > reindex the system tables: Curious. I'd have thought the reindex would fail because of the duplicate datname entries. > And trying ctid didn't work, assuming this syntax is correct: > backend> delete from pg_database where ctid = '(0,37)'; Even more curious. I'm starting to think it's some sort of XID wraparound problem, except if you can see it in SELECT then why doesn't the DELETE see it? Could you show all the system columns of pg_database, viz select xmin, cmin, xmax, cmax, oid, ctid, datname from pg_database; regards, tom lane