pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Lister <john.lister-ps@kickstone.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: database corruption help
Date: Mon, 9 Feb 2009 19:20:40 -0000
Message-ID: <AB15E89CD7FB4EBD9D76CC5F8D8B3D4E@squarepi.com> (raw)
References: <507152DDF8AB4DF093BD01A8BEC7C659@squarepi.com>
	<17205.1234200693@sss.pgh.pa.us>

Cheers tom, that did it - i've removed the duplicates and seeing what else 
is broken.

.


> "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
> 




view thread (19+ messages)  latest in thread

Message-ID: <AB15E89CD7FB4EBD9D76CC5F8D8B3D4E@squarepi.com>
Permalink:  ../AB15E89CD7FB4EBD9D76CC5F8D8B3D4E@squarepi.com/
Also on:    postgresql.org/message-id/AB15E89CD7FB4EBD9D76CC5F8D8B3D4E@squarepi.com

 · 

reply

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: john.lister-ps@kickstone.com, tgl@sss.pgh.pa.us
  Subject: Re: database corruption help
  In-Reply-To: <AB15E89CD7FB4EBD9D76CC5F8D8B3D4E@squarepi.com>

* 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