Re: Deadlock. Referential Integrity checks select for update? - Mailing list pgsql-general

From Tom Lane
Subject Re: Deadlock. Referential Integrity checks select for update?
Date
Msg-id 2301.1088140705@sss.pgh.pa.us
Whole thread Raw
In response to Deadlock. Referential Integrity checks select for update?  (Grant McLean <grant@catalyst.net.nz>)
List pgsql-general
Grant McLean <grant@catalyst.net.nz> writes:
> I don't understand why these two queries include "FOR UPDATE".

The point is to lock the referenced rows so they cannot be deleted
before the referencing transaction commits.  FOR UPDATE is an overly
strong lock, but we do not presently have any weaker lock that will
serve.  You can find lots more about this issue in the archives...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Running two postmasters on one host: could not create semaphores
Next
From: Achilleus Mantzios
Date:
Subject: tsearch2,pgsql 7.4.[1|2], pg_dump problem