From: John Lister <john.lister-ps@kickstone.com>
To: pgsql-admin@postgresql.org
Subject: database corruption help
Date: Mon, 9 Feb 2009 16:37:11 -0000
Message-ID: <507152DDF8AB4DF093BD01A8BEC7C659@squarepi.com> (raw)
Hi, my wal archiving broke and postgresql filled up the local disk with transaction logs, which i foolishly deleted in a moment of madness, after resetting the transaction log a few of my tables are damaged but repairable. However the system tables also seemed to have suffered. My main problem is duplicate rows which violated the primary key and if i do a reindex system i get similar errors, for example:
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 )
Many thanks
--
Got needs? Get Goblin'! - http://www.pricegoblin.co.uk/
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
Subject: Re: database corruption help
In-Reply-To: <507152DDF8AB4DF093BD01A8BEC7C659@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