Re: Vacuum Error - Mailing list pgsql-general

From Tom Lane
Subject Re: Vacuum Error
Date
Msg-id 5543.1073946686@sss.pgh.pa.us
Whole thread Raw
In response to Vacuum Error  (Dave Smith <dave.smith@candata.com>)
Responses Re: Vacuum Error
Re: Vacuum Error
List pgsql-general
Dave Smith <dave.smith@candata.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

pgsql-general by date:

Previous
From: Alex Satrapa
Date:
Subject: Re: Dump tables with pg_dump - no or different Owner
Next
From: Tom Lane
Date:
Subject: Re: Dump/Restore ordering problem?