Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67] (may be forged)) by hub.org (8.9.3/8.9.3) with ESMTP id PAA73495 for ; Tue, 25 Jan 2000 15:32:52 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id PAA20686; Tue, 25 Jan 2000 15:08:46 -0500 (EST) From: Bruce Momjian Message-Id: <200001252008.PAA20686@candle.pha.pa.us> Subject: Re: [SQL] Duplicate tuples with unique index In-Reply-To: <13944.948817572@sss.pgh.pa.us> from Tom Lane at "Jan 25, 2000 11:26:12 am" To: Tom Lane Date: Tue, 25 Jan 2000 15:08:46 -0500 (EST) CC: Palle Girgensohn , Patrik Kudo , "pgsql-sql@postgreSQL.org" X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > 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. > Running pg_upgrade is another option. -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026