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