Thread: heap errors - should I be worried?

heap errors - should I be worried?

From
Ulrich Wisser
Date:
Hello,

yesterday I took our database down and started in single user mode.
After reindexing of three tables I thought a vacuum would be a good idea.

backend> VACUUM FULL VERBOSE ANALYZE
WARNING:  Index pg_statistic_relid_att_index: NUMBER OF INDEX' TUPLES
(163) IS NOT THE SAME AS HEAP' (345).
         Recreate the index.
WARNING:  Index pg_statistic_relid_att_index: NUMBER OF INDEX' TUPLES
(5) IS NOT THE SAME AS HEAP' (345).
         Recreate the index.
WARNING:  Index pg_toast_16408_index: NUMBER OF INDEX' TUPLES (2) IS NOT
THE SAME AS HEAP' (7).
         Recreate the index.

Should these errors worry me? What do they mean? IS there anything I
need to do / should have done?

TIA

/Ulrich


Re: heap errors - should I be worried?

From
Tom Lane
Date:
Ulrich Wisser <ulrich.wisser@relevanttraffic.se> writes:
> WARNING:  Index pg_statistic_relid_att_index: NUMBER OF INDEX' TUPLES
> (163) IS NOT THE SAME AS HEAP' (345).
>          Recreate the index.

> Should these errors worry me?

Yeah, they should.  A REINDEX will probably get you out of the immediate
problem, but the more interesting question is how you got to be missing
index entries in the first place.  Have you had any crashes or hardware
problems lately?  What PG version is this?

            regards, tom lane

Re: heap errors - should I be worried?

From
Ulrich Wisser
Date:
Hi Tom,

>>WARNING:  Index pg_statistic_relid_att_index: NUMBER OF INDEX' TUPLES
>>(163) IS NOT THE SAME AS HEAP' (345).
>>         Recreate the index.
>
>>Should these errors worry me?
>
> Yeah, they should.  A REINDEX will probably get you out of the immediate
> problem, but the more interesting question is how you got to be missing
> index entries in the first place.  Have you had any crashes or hardware
> problems lately?  What PG version is this?

PG version 7.3.4
No hardware problems or crashes I know of. I do a "vacuum full analyze"
once every night and never did see these problems. Only yesterday after
I used reindex on three tables did I see these problems.

I will try to reindex the database tonight.

Thanks

Ulrich