Re: how to use pg_resetxlog - closer ...

Started by Johnson, Shaunnover 22 years ago2 messagesgeneral
Jump to latest
#1Johnson, Shaunn
SJohnson6@bcbsm.com

Thanks to all ... I think I'm closer to at leasting
something useful as far as the database is concern.

Recap: Running PostgreSQL 7.2.1 on RedHat Linux 7.2
and I just experienced a RAID failure with the DB
still active. Tom pointed me in the area of the file
'1249' which was no longer in my database directory.
I copied that from anther directory and got part
of the way there. There were some errors regarding
missing files in pg_clog - I faked that, too.

Now: I am getting an error when I try to do a select
from any table :

[snip]
cannot find attribute 1 of relation <table>
[/snip]

Looking in the groups.google.com, I see similar things
which was fixed with running PostgreSQL in stand alone
mode and forcing a reindex. When I tried that, I got:

[snip error]

[/snip]
backend> reindex database testdb force ;
DEBUG: StartTransactionCommand
DEBUG: query: reindex database testdb force ;

DEBUG: ProcessUtility: reindex database testdb force ;

ERROR: Cannot create unique index. Table contains non-unique values
DEBUG: AbortCurrentTransaction
[snip error]

Is there a way around this so I can at least dump some
data?

Thanks bunches!

-X

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Johnson, Shaunn (#1)

"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes:

Recap: Running PostgreSQL 7.2.1 on RedHat Linux 7.2
and I just experienced a RAID failure with the DB
still active. Tom pointed me in the area of the file
'1249' which was no longer in my database directory.
I copied that from anther directory and got part
of the way there.

Uh, that will most definitely NOT work. You've installed some other
database's list of table columns. If you can't resurrect the original
pg_attribute file for this database (did you look in /lost+found?)
then I think you are well and truly screwed :-(. Time to revert to
backup, because there is no hope of extracting anything useful.

regards, tom lane