Received: from bastuba.partitur.se (bastuba.partitur.se [193.219.246.194]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA95900 for ; Tue, 25 Jan 2000 11:03:09 -0500 (EST) (envelope-from girgen@partitur.se) Received: from elbas.partitur.se (elbas.partitur.se [193.219.246.222]) by bastuba.partitur.se (8.8.8/8.8.8) with ESMTP id RAA09824; Tue, 25 Jan 2000 17:03:06 +0100 (CET) (envelope-from girgen@partitur.se) Received: from partitur.se (localhost [127.0.0.1]) by elbas.partitur.se (8.9.3/8.9.3) with ESMTP id RAA38238; Tue, 25 Jan 2000 17:03:05 +0100 (CET) (envelope-from girgen@partitur.se) Sender: girgen@partitur.se Message-ID: <388DC939.1335143@partitur.se> Date: Tue, 25 Jan 2000 17:03:05 +0100 From: Palle Girgensohn Organization: Partitur X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.3-RELEASE i386) X-Accept-Language: sv, en MIME-Version: 1.0 To: Tom Lane CC: Patrik Kudo , "pgsql-sql@postgreSQL.org" Subject: Re: [SQL] Duplicate tuples with unique index References: <388876AD.A7FE47D3@partitur.se> <4877.948471782@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tom Lane wrote: > > Patrik Kudo 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=>