From: | "Patrick Fiche" <patrick(dot)fiche(at)aqsacom(dot)com> |
---|---|
To: | "PostgreSQL - General (E-mail)" <pgsql-general(at)postgresql(dot)org> |
Subject: | problem after REINDEX command |
Date: | 2002-10-21 08:15:46 |
Message-ID: | 85058ADF852DD5118FD50002A528A5B6079A92@SERVEUR |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm having trouble with pg_statistic table.
I tried to reindex my database with command
REINDEX DATABASE EASYSHARE FORCE
I had the error : "Cannot create unique index. Table contains non-unique
values"
The index was pg_statistic_relid_att_index
In fact, when I execute the query :
SELECT starelid, staattnum, count(*) from pg_statistic group by starelid,
staattnum having count(*) > 1
I get some tuples ( 16584, 1, 2 ), ( 16584, 2, 2 ), ( 16584, 3, 2), ( 16584,
5, 2), ( 16584, 9, 2 ) and ( 16584, 10, 2 )
Relation 16584 is a user table...
The only solution is to empty the table pg_statistic and recreate the index
with the following command
CREATE UNIQUE INDEX pg_statistic_relid_att_index ON pg_statistic USING
BTREE( starelid, staattnum ) and then run REINDEX with FORCE flag...
I'm using 7.2.3
Patrick Fiche
email : patrick(dot)fiche(at)aqsacom(dot)com
tél : 01 69 29 36 18
From | Date | Subject | |
---|---|---|---|
Next Message | mk | 2002-10-21 08:27:29 | Re: referential integrity violation |
Previous Message | frank_lupo | 2002-10-21 06:32:41 | Re: [pgadmin-support] hi |