REINDEX "is not a btree"

From: Vanessa Lopez <v(dot)lopez(at)open(dot)ac(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "V(dot)Lopez" <vl474(at)openmail(dot)open(dot)ac(dot)uk>
Subject: REINDEX "is not a btree"
Date: 2009-07-03 14:33:03
Message-ID: 70D6F42F-F173-4BA6-AE4B-1D1F6B14FC05@open.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

I got into a situation I don't know how the get out ..
First, I could not access to my biggest database in postgre anymore
because it suddenly gave the error (after long time working with no
problems)

>>>> ERROR: could not open relation 1663/392281/530087: No such file
>>>> or directory

After trying with several backups with no success, I did a vacuum and
I tried to REINDEX the database (in the standalone back-end).

Unfortunately the process was interrupted, and when I tried to start
postgres again I got the error:

'SQL select * from pg_database order by datname failed : index
"pg_authid_rolname_index" is not a btree"

I connected as a standalone mode again to REINDEX the database:
pg_ctl stop -D /data/pgsql/data
/usr/bin/postgres -D /data/pgsql/data dbpedia_infoboxes
REINDEX database dbpedia_infoboxes

The REINDEX was successful this time but I was still having the "is
not a btree" problem, so I tried again with:
pg_ctl stop -D /data/pgsql/data
/usr/bin/postgres -D /data/pgsql/data dbpedia_infoboxes
REINDEX SYSTEM dbpedia_infoboxes

The process finish, but I was still having the "is not a btree" problem.
And even more, now not only the same problem "is not a btree" is still
there, but also I can not connect in the standalone mode anymore:

bash-3.2$ /usr/bin/postgres -D /data/pgsql/data dbpedia_infoboxes
FATAL: index "pg_database_datname_index" is not a btree
(I tried with other databases as well and the same)

I don't know much about postgre, I have no clue what else I can do.
Please, please any help is very very much appreciated I have lots of
databases and months of work in postgre (also lots of backups for the
data in /data) but I don't know how to make postgres to work again.
(it is working in unix red hat).

Millions of thanks in advance, solving this problem is crucial for me.
Vanessa

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-03 14:35:34 Re: [HACKERS] commitfest.postgresql.org
Previous Message Tom Lane 2009-07-03 14:14:21 Re: [HACKERS] commitfest.postgresql.org