Re: [SQL] Duplicate tuples with unique index - Mailing list pgsql-sql

From Palle Girgensohn
Subject Re: [SQL] Duplicate tuples with unique index
Date
Msg-id 388DC939.1335143@partitur.se
Whole thread Raw
In response to Duplicate tuples with unique index  (Patrik Kudo <kudo@partitur.se>)
Responses Re: [SQL] Duplicate tuples with unique index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Tom Lane wrote:
> 
> Patrik Kudo <kudo@partitur.se> writes:
> > db=> vacuum ;
> > NOTICE:  Rel pg_statistic: TID 1/93: OID IS INVALID. TUPGONE 0.
> > NOTICE:  Index html_text_idx: NUMBER OF INDEX' TUPLES (1193) IS NOT THE
> > SAME AS HEAP' (1258)
> > ERROR:  Cannot insert a duplicate key into a unique index
> 
> Given the reference to pg_statistic, I wonder if you aren't getting
> burnt by the recently-discovered bug wherein VACUUM ANALYZE tries to
> create pg_statistic tuples that are too long.  I recommend (a) patch
> vacuum.c (see Dirk Lutzebaeck's nearby message); then (b) drop and
> recreate html_text_idx; finally (c) DELETE FROM pg_statistic and
> then VACUUM ANALYZE to rebuild it.  Good luck!
> 
>                         regards, tom lane
> 
> ************
Unfotunately, it doesn't quite work:

pp=> vacuum analyze;
NOTICE:  Rel pg_statistic: TID 1/93: OID IS INVALID. TUPGONE 0.
VACUUM
pp=> delete from pg_statistic;
ERROR:  heap_delete: (am)invalid tid
pp=>


pgsql-sql by date:

Previous
From: Julian Scarfe
Date:
Subject: Re: [SQL] DISTINCT ON: speak now or forever hold your peace
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Duplicate tuples with unique index