Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

db crash after power crash



Hi.

Some hours ago there was a power failure with my test machine while
active inserting data. After power back the OS done some "fsck", clean
some files (related to postgres working directory). Then I connect to
my DB and see this:

billing=# \d
ERROR:  index "pg_attribute_relid_attnum_index" is not a btree
billing=# reindex index pg_attribute_relid_attnum_index;
ERROR:  catalog is missing 1 attribute(s) for relid 2678

I searched through archives and tried to do some:

# reindexdb  -s -U root -d billing
Password:
reindexdb: reindexing of system catalogs failed: ERROR:  index
"pg_attribute_relid_attnum_index" is not a btree
# reindexdb  -U root -d billing
Password:
reindexdb: reindexing of database "billing" failed: ERROR:  index
"pg_attribute_relid_attnum_index" is not a btree

as you can see, without success. And so with vacuumdb.

That all was on my test (learning) environment... But this may occur
on production machine (who knows, anything may happens) and I want to
know how to play with such situations (or workaround them). My only
idea - to get the last 'pg_dump' file, drop database and restore it
from that file... but it is ugly idea because many recent data will be
lost. Is there other ways?

--
engineer



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group