Excerpts from rh's message of mié ago 11 15:24:33 -0400 2010:
> Hi,
> I'm getting this error when trying to select from a table:
> "8 trigger record(s) not found for relation managements"
>
> Looking into this a little, I found this page
> http://www.postgresql.org/docs/8.0/static/catalog-pg-trigger.html that
> says:
> Note: pg_class.reltriggers needs to agree with the number of triggers
> found in this table for the given relation.
>
> And, indeed:
>
> select reltriggers FROM pg_class where relname='managements';
> Returns 68
>
> And this (16460 is the managements table oid):
> select * from pg_trigger where tgrelid=16460;
>
> Returns 60
>
> Does anyone have an idea about what could cause this or how to fix it?
Are you really running 8.0?
I suggest trying a reindex of pg_trigger (you may need to run in
standalone mode). If this fixes it, I'd suggest you dump and restore
the complete database, to ensure that there isn't any more catalog
corruption. This would also help to determine whether there is
corruption elsewhere, though some will be undetectable unless you
manually examine the data.
You should get off 8.0 soon.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support