Re: BUG #4648: needless deadlock on tables having foreign-key

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Konstantin <kostya2702(at)rambler(dot)ru>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4648: needless deadlock on tables having foreign-key
Date: 2009-02-12 15:54:34
Message-ID: 10574.1234454074@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Hmm, the first UPDATE should've blocked already. It should've fired a RI
> trigger to lock the parent tuple in shared mode, but it looks like
> that's not happening for some reason.

Read the special code in AfterTriggerSaveEvent. This behavior is
exactly what is expected --- since the referencing field didn't
change, only the second update attempt actually fires the trigger.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2009-02-12 16:54:27 Re: BUG #4649: unclear in create trigger - complete example
Previous Message Heikki Linnakangas 2009-02-12 15:45:53 Re: BUG #4648: needless deadlock on tables having foreign-key