From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Flávio Suguimoto <flavio(dot)suguimoto(at)pragyatechnologies(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Problems with disabling triggers in Postgres 7.3.9 |
Date: | 2006-03-09 13:55:57 |
Message-ID: | 20060309135557.GA5489@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Flávio Suguimoto wrote:
> Hi all,
>
> I have a problem in a trigger that disable all the triggers of a table. This
> error occurs randomly and my guess is that occurs when i have a lot of
> concurrents inserts in the table participation.
>
> The error is : RelationBuildTriggers: 2 record(s) not found for rel
> participation
I don't know what's involved in this particular bug, but the short
answer is: don't update system catalogs directly. Have your triggers
cope with the situation where you don't want to fire them in certain
cases.
System catalogs are delicate stuff; there are some caches that must be
maintained in a coherent manner. Usually the catalogs do not follow
MVCC rules to the letter. The "UPDATE pg_class" was used by pg_dump at
some point, but it was only a hack and I wouldn't expect it to work
correctly when multiple processes are involved.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2006-03-09 13:59:16 | Re: |
Previous Message | A. Kretschmer | 2006-03-09 13:53:12 | Re: |