Re: Lock problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eduardo Piombino <drakorg(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Lock problem
Date: 2011-09-08 00:29:07
Message-ID: 9342.1315441747@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Fujii Masao 2011-09-08 05:43:18 Re: master-side counterpart of pg_last_xact_replay_timestamp?
Previous Message Eduardo Piombino 2011-09-08 00:15:28 Lock problem