Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B45DD9FB7C5 for ; Thu, 5 Jul 2007 14:38:55 -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 29895-01 for ; Thu, 5 Jul 2007 14:38:51 -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 8DD9A9FB799 for ; Thu, 5 Jul 2007 14:38:51 -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 l65HcnmP019239; Thu, 5 Jul 2007 13:38:49 -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> <18569.1183652804@sss.pgh.pa.us> Comments: In-reply-to "James Wilford" message dated "Thu, 05 Jul 2007 17:38:48 +0100" Date: Thu, 05 Jul 2007 13:38:49 -0400 Message-ID: <19238.1183657129@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/46 X-Sequence-Number: 26027 "James Wilford" writes: > It's a redhat version of 7.3 - rh-postgresql-server-7.3.8-2 is the > package. That was obsoleted by Red Hat well over two years ago; you are overdue for an update. > xmin | cmin | xmax | cmax | oid | ctid | datname > ----------+------------+------------+------+----------+--------+-------- > 59254726 | 0 | 0 | 0 | 31238435 | (0,28) | misp > 2 | 2430588419 | 2430588419 | 0 | 6790290 | (0,37) | misp It definitely looks to me like you have a problem with XID wraparound :-( The (0,37) row was apparently deleted long ago, but never vacuumed away, and now its xmax has wrapped around past the 2-billion-transaction event horizon, causing it to appear visible to MVCC-using queries. So there's something broken about your routine vacuuming procedures; you'd better take a look at that. 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. regards, tom lane