Re: Vacuum Error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Smith <dave(dot)smith(at)candata(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Vacuum Error
Date: 2004-01-12 22:31:26
Message-ID: 5543.1073946686@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dave Smith <dave(dot)smith(at)candata(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-01-12 22:36:38 Re: Dump/Restore ordering problem?
Previous Message Alex Satrapa 2004-01-12 22:31:06 Re: Dump tables with pg_dump - no or different Owner