Search Postgresql Archives

Re: why dropping a trigger may cause a deadlock

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

 



Ivan Sergio Borgonovo <mail@xxxxxxxxxxxxxxx> writes:
> I don't get it.
> Why dropping the triggers would cause a deadlock anyway?

> I bet it is due to my naïve view of the problem but I think a
> trigger is a "function". Unless there is concurrent access to the
> table where the function is defined... I can't see why dropping the
> "functions" serially should cause a lock.

They're not just functions, they are part of the DDL for a table.
Adding or removing a trigger on a table requires exclusive lock
on that table, otherwise you can't be sure what will happen in
concurrent transactions that might (or might not) be supposed to
fire the trigger.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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