From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Lister <john.lister-ps@kickstone.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: database corruption help
Date: Mon, 09 Feb 2009 12:31:33 -0500
Message-ID: <17205.1234200693@sss.pgh.pa.us> (raw)
In-Reply-To: <507152DDF8AB4DF093BD01A8BEC7C659@squarepi.com>
References: <507152DDF8AB4DF093BD01A8BEC7C659@squarepi.com>
"John Lister" <john.lister-ps@kickstone.com> writes:
> ERROR: could not create unique index "pg_class_oid_index"
> a quick inspection of the pg_class table doesn't show any duplicates, is there anyway i can find out which row(s) are duplicated and remove them without a full db restore?
> also doing something like this doesn't return anything which worked for my other tables
> select oid from pg_class where oid in(select oid from pg_class group by oid having count(oid)>1 )
Try doing it with enable_indexscan = off and enable_bitmapscan = off.
The system might be relying on the old, bogus index to do the group by
oid.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, john.lister-ps@kickstone.com
Subject: Re: database corruption help
In-Reply-To: <17205.1234200693@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox