Re: 8 trigger record(s) not found for relation managements

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: rh <reuvenharrison(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: 8 trigger record(s) not found for relation managements
Date: 2010-08-11 20:12:20
Message-ID: 1281557434-sup-4898@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2010-08-11 21:25:53 Re: JASPA (JAva SPATial) for PostgreSQL and H2 released
Previous Message Adrian von Bidder 2010-08-11 20:02:45 Re: Is there a way to bypass sql?