Hi Tom,

Thanks for the reply! The reindex command you provided did not work, it gave
the same error as the one I got when logging in earlier, however I was
feeling reckless so I did reindex database <mydatabase>; and that completed
as follows:

NOTICE:  table "pg_class" was reindexed
NOTICE:  table "sql_features" was reindexed
NOTICE:  table "sql_implementation_info" was reindexed
NOTICE:  table "sql_languages" was reindexed
NOTICE:  table "sql_packages" was reindexed
NOTICE:  table "sql_sizing" was reindexed
NOTICE:  table "sql_sizing_profiles" was reindexed
NOTICE:  table "pg_statistic" was reindexed
ERROR:  invalid page header in block 43 of relation "pg_attribute"

So I tried the reindex index pg_class_oid_index; again, and it responded
with REINDEX, so I assume it succeeded. I can also login to the database as
normal now(with out the PGOPTIONS="-P"). I'm assuming I should probably
worry about the ERROR above. Is there another repair command to fix this or
should I try to dump/initdb/reload?

Thanks,

Andrew

On Fri, Jul 24, 2009 at 2:33 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:

> Andrew Radamis <rust...@gmail.com> writes:
> > I'm getting this error when I try to log into my database.
> > *FATAL: root page 3 of "pg_class_oid_index" has level 0, expected 1
>
> You've got a corrupted index.  You can probably fix it like this:
>
>        export PGOPTIONS="-P"
>        psql ..usual options..
>        reindex index pg_class_oid_index;
>
> After that, a dump/initdb/reload might be in order, since it's hard to
> tell whether there are other problems lurking.  Some testing of your
> hardware might be advisable too; and I'd suggest updating your Postgres
> if it's not a recent release.
>
>                        regards, tom lane
>

Reply via email to