X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id DA7DCD1B47A for ; Mon, 12 Jan 2004 22:32:05 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 84397-04 for ; Mon, 12 Jan 2004 18:31:37 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id CFE04D1B461 for ; Mon, 12 Jan 2004 18:31:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id i0CMVQ19005544; Mon, 12 Jan 2004 17:31:29 -0500 (EST) To: Dave Smith Cc: "pgsql-general@postgresql.org" Subject: Re: Vacuum Error In-reply-to: <1073933333.13458.17.camel@playpen> References: <1073933333.13458.17.camel@playpen> Comments: In-reply-to Dave Smith message dated "Mon, 12 Jan 2004 13:48:53 -0500" Date: Mon, 12 Jan 2004 17:31:26 -0500 Message-ID: <5543.1073946686@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/539 X-Sequence-Number: 55567 Dave Smith writes: > I am running 7.2 and when doing a vacuum I am getting the following > error.... > ERROR: Cannot insert a duplicate key into unique index > pg_statistic_relid_att_index Hmm, if it were a slightly newer version I'd be interested in how you got into this state, but since it's 7.2 I'll write it off as an old bug. The easiest way out, seeing that pg_statistic is all derived data, is just DELETE FROM pg_statistic; (possibly VACUUM FULL pg_statistic here) re-ANALYZE everything You should try the nearby suggestion to REINDEX first, but I'm betting that that doesn't help. regards, tom lane