Re: Deadlocks caused by a foreign key constraint

From: Decibel! <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: dmitry(at)koterov(dot)ru, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Deadlocks caused by a foreign key constraint
Date: 2007-08-16 10:09:41
Message-ID: 20070816100940.GA54135@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 16, 2007 at 01:21:43AM -0400, Tom Lane wrote:
> Decibel! <decibel(at)decibel(dot)org> writes:
> > But... taking a quick look at RI_FKey_check in backend/utils/adt/
> > ri_triggers.c, I don't see it checking to see if the FK has changed,
> > which seems odd. I would think that if the FK fields haven't changed
> > that there's no need to perform the check.
>
> You looked in the wrong place; see AfterTriggerSaveEvent in
> commands/trigger.c

Ahh, I figured it must be in here somewhere...

I guess it's safe to say that RI triggers get a decent amount of special
treatment in the backend compared to normal triggers.
--
Decibel!, aka Jim Nasby decibel(at)decibel(dot)org
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rainer Bauer 2007-08-16 10:12:03 Re: Yet Another COUNT(*)...WHERE...question
Previous Message Peter Eisentraut 2007-08-16 09:40:38 Re: array for cstring type