"Thomas Chille" <thomas(at)chille(dot)de> writes:
> Ah ok, 9293 is a triggerd process and tries to "ALTER TABLE ...
> DISABLE TRIGGER (other trigger)" and so implicitly tries to acquire an
> AccessExclusiveLock and runs in a deadlock?
Well, you're certainly risking deadlock with that; and even if no
actual deadlock happens, waiting for the exclusive lock needed to
do the ALTER can cause the kind of lock queueing you had here.
I'd suggest trying to think of a way to solve your problem that doesn't
need trigger enabling/disabling.
regards, tom lane