Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BBA369FBE39 for ; Thu, 5 Jul 2007 15:17:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 38462-04 for ; Thu, 5 Jul 2007 15:17:19 -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 6F0849FBA24 for ; Thu, 5 Jul 2007 15:17:19 -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 l65IHG5S019715; Thu, 5 Jul 2007 14:17:16 -0400 (EDT) To: Alvaro Herrera cc: James Wilford , pgsql-admin@postgresql.org Subject: Re: More than one pg_database entry for database In-reply-to: <20070705175304.GL5500@alvh.no-ip.org> References: <11565.1183647202@sss.pgh.pa.us> <18569.1183652804@sss.pgh.pa.us> <19238.1183657129@sss.pgh.pa.us> <20070705175304.GL5500@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Thu, 05 Jul 2007 13:53:04 -0400" Date: Thu, 05 Jul 2007 14:17:16 -0400 Message-ID: <19714.1183659436@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/51 X-Sequence-Number: 26032 Alvaro Herrera writes: > Tom Lane wrote: >> As far as getting out of the situation, the only really good answer is a >> dump and reload. I can't think of any simple way of getting rid of the >> bogus row, but what you should be able to do to let pg_dump work is to >> rename misp to something else. You can rename it back after getting >> through the dump/reload, of course. > Or roll the XID counter back, vacuum the table, and restore the XID to > the original value. This is done with pg_resetxlog, though I am not > sure if we shipped it in 7.3. That seems fairly hazardous, in particular there might be undesirable side-effects on other system catalogs while you are running with the set-back XID counter. Also, I see no very good reason to assume that this is the only wraparound problem present in the DB. A dump and reload would probably be useful to help check for other inconsistencies. regards, tom lane