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 LAA01970 for ; Tue, 25 Jan 2000 11:26:41 -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 LAA13947; Tue, 25 Jan 2000 11:26:13 -0500 (EST) To: Palle Girgensohn cc: Patrik Kudo , "pgsql-sql@postgreSQL.org" Subject: Re: [SQL] Duplicate tuples with unique index In-reply-to: <388DC939.1335143@partitur.se> References: <388876AD.A7FE47D3@partitur.se> <4877.948471782@sss.pgh.pa.us> <388DC939.1335143@partitur.se> Comments: In-reply-to Palle Girgensohn message dated "Tue, 25 Jan 2000 17:03:05 +0100" Date: Tue, 25 Jan 2000 11:26:12 -0500 Message-ID: <13944.948817572@sss.pgh.pa.us> From: Tom Lane Palle Girgensohn writes: > 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 Ugh. Yup, your pg_statistic table is corrupted all right. What you may have to do is pg_dump that database, destroydb/createdb, and reload. I have a possible shortcut for you, but I *strongly* suggest that you pg_dump first in case it doesn't work! After making your backup dump, stop the postmaster and truncate the broken database's pg_statistic file to zero length: cp /dev/null .../data/base/yourdb/pg_statistic Then restart the postmaster and see if you can vacuum analyze the broken database. If so, you are good to go; if not, it's time to reload that database. regards, tom lane