Search Postgresql Archives

Re: Trigger disactivation and SELECT WAITING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Philippe Lang" <philippe.lang@xxxxxxxxxxxxxx> writes:
> I meant: in 7.4.X databases, is there a way of disabling a trigger without deleting it? I guess the answer is no.

Nothing officially supported, anyway.  There's a pg_trigger.tgenabled
column but I'm not sure which operations pay attention to it.

> That's what my plpgsql insert function does, and because of this, if a view is running at the same moment on the same tables (some views can take up to 2 hours to be calculated), the insert function gets stuck in a SELECT WAITING state. So insertions are impossible in the database when views are being calculated.

I guess I question a database design in which you routinely have to drop
triggers in order to get your work done.  Why have the trigger at all if
you do so many changes to the table with it deleted?  Why not improve
the trigger to be smart enough to not interfere with what you need the
insertion function to do?

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux