Re: yet another db corruption issue (more info)

From: "Jon Lapham" <lapham(at)extracta(dot)com(dot)br>
To: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: yet another db corruption issue (more info)
Date: 2001-10-18 10:57:08
Message-ID: 200110181057.f9IAv8G31704@office.extracta.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Indeed, the problem has been tracked down to hardware. Bad RAM. I was (with
the kind help of some list members) able to rebuild the database without any
data loss.

Basically, what I had to do was update 'pg_class->relnatts' from 19 to 18.
This single change allowed me to actually work with the fraction table, but
without the ability to access the missing 'editdate' attribute.

Then, I tried to add a new column to 'fraction' using "ALTER TABLE fraction
ADD editdate ...", this barfed saying that the "editdate" colun already exists.

So, I then ran a "ALTER TABLE fraction RENAME editdate TO editdate2". This
command suceeeded, but I still couldn't see the missing attribute in \d
fraction. So, I re-updated pg_class and set relnatts back to 19. Now I could
see and access the 'editdate2' attribute! A simple rename command put
everything back together again.

Now I can sleep.

--
-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---
Jon Lapham
Extracta Molculas Naturais, Rio de Janeiro, Brasil
email: lapham(at)extracta(dot)com(dot)br web: http://www.extracta.com.br/
***-*--*----*-------*------------*--------------------*---------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Flávio Brito 2001-10-18 11:05:45 Backup Postgre Windows to Linux
Previous Message Victor Ivanov 2001-10-18 09:17:00 creating a custom server