Eduardo Piombino <drakorg(at)gmail(dot)com> writes:
> I don't see how a new update to the same record in A, makes the difference
> to allow or deny the lock on a row on table B;
I think it's probably explained by this:
> PS: The only relation between A and B is that A has a two FKs to B, but none
> of them are even included in the updates.
IIRC there are some optimizations in the FK stuff that don't apply once
a single transaction has updated a relevant row more than once. You
haven't given enough details (not even a PG version) to be sure about
it, but that's what I'd bet on.
regards, tom lane