[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: [ADMIN] Crash revoery
From:       Holger Mitterwald <hrmitter () mitterwald ! de>
Date:       1999-06-23 11:23:21
[Download RAW message or body]

On Wed, 23 Jun 1999, Vadim Mikheev wrote:

> Holger Mitterwald wrote:
[..]
> > The error-message is:
> > ERROR:  Index pg_proc_oid_index is not a btree
> > 
> > The pg_proc_oid_index file in the data/base/ directory has the size 0
> > Bytes - which I think is not correct.
> > I still can connect to the database. After a few error messages it somehow
> > works. But I still can't do a "vacuum" as the error rises again.
> > 
> > I guess in the file "pg_proc_oid_index" should be the index. So how can I
> > recreate the index again so that it works fine again?
> 
> Well. Try to
> 
> create index proc_tmp on pg_proc (oid);
> 
> Now cd to database dir and cp proc_tmp to pg_proc_oid_index and
> 
> drop index proc_tmp;
> 
> Let's know if it helps.
> 
> Vadim

As the thing needed to happen fast, I removed all the old (buggy) files
from the databases dir, created the base and my own databases new and
inserted my backup. Then I stopped the database, moved the new files away
and restored the crashed data. pgdump did not work even for single tables,
but a "select * ..." did the job. I was not able to select any "where"
clauses (I think it needs the corrupt index for this). Now "all I had to
do" was to delete from each select * output the old data, reformat it as
SQL inserts and put the data back in the new (clean) database. Half an
hour work and the database runs again. (I LIKE the vi :-) )

Last thing I did was to create a cronjob that dumps the database every
night :-)

As I still have the corrupt data I will install the old postgresql version
and try the trick on my computer at home. 

Thanks for the help!

So long,
       Holger Mitterwald


--
                              Holger Mitterwald
Kneipenfuehrer Deutschland                                   pub guide germany
http://www.mitterwald.de/kneipen/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic