Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA67479 for ; Fri, 21 Jan 2000 11:23:31 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id LAA04880; Fri, 21 Jan 2000 11:23:02 -0500 (EST) To: Patrik Kudo cc: "pgsql-sql@postgreSQL.org" , girgen@partitur.se Subject: Re: [SQL] Duplicate tuples with unique index In-reply-to: <388876AD.A7FE47D3@partitur.se> References: <388876AD.A7FE47D3@partitur.se> Comments: In-reply-to Patrik Kudo message dated "Fri, 21 Jan 2000 16:09:33 +0100" Date: Fri, 21 Jan 2000 11:23:02 -0500 Message-ID: <4877.948471782@sss.pgh.pa.us> From: Tom Lane 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