Обсуждение: problem with pg_statistic_relid_att_index

Поиск
Список
Период
Сортировка

problem with pg_statistic_relid_att_index

От
"Tony Da Silva"
Дата:
Hi,


I seem to have  a problem on one of my databases,


When I log into pgsql I see this:


ERROR:  Invalid page header in block 3 of pg_statistic_relid_att_index
Welcome to psql 7.3.4, the PostgreSQL interactive terminal.


When I try to run any command (eg vacuum) I get this message:


dbname=> vacuum full;
ERROR:  current transaction is aborted, queries ignored until end of
transaction block


reindex also does not work:


dbname=> reindex index pg_statistic_relid_att_index;
ERROR:  current transaction is aborted, queries ignored until end of
transaction block


Please can somebody help if you know how to fix this.

Thx
Tony




Re: problem with pg_statistic_relid_att_index

От
Tom Lane
Дата:
"Tony Da Silva" <tony@altonet.co.za> writes:
> When I log into pgsql I see this:
> ERROR:  Invalid page header in block 3 of pg_statistic_relid_att_index

I can't think of any reason that a simple connection attempt would be
trying to read pg_statistic.  Perhaps you have some nontrivial query
in your ~/.psqlrc?  If so try taking that out.

If that doesn't work you might have to resort to setting
zero_damaged_pages in postgresql.conf, but that's a pretty dangerous
tool --- it might zap pages you weren't expecting it to.  Don't
keep it on any longer than you absolutely have to.

Once you do get into the DB you should be able to just REINDEX
pg_statistic to fix the problem.  (In 7.3 you might have to use a
standalone backend for that, I don't recall for sure.)

> Welcome to psql 7.3.4, the PostgreSQL interactive terminal.

Egad.  You do know that 7.3 was up to 7.3.21 before we obsoleted it?
If your DB is unrecoverable because of some data-eating bug that was
fixed in the past four-plus years, you're not going to get a lot of
sympathy.

            regards, tom lane