Re: deferred foreign keys - Mailing list pgsql-performance

From Vivek Khera
Subject Re: deferred foreign keys
Date
Msg-id F5B07BC8-3FB0-11D8-A8A5-000A9578CFCC@kcilink.com
Whole thread Raw
In response to Re: deferred foreign keys  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-performance
On Jan 5, 2004, at 1:38 PM, Bruno Wolff III wrote:

> I think this is probably the issue with foreign key checks needing an
> exclusive lock, since there is no shared lock that will prevent
> deletes.
>

That was my original thought upon reading all the discussion of late
regarding the FK checking locks.  I figured if I deferred the checks to
commit, I could save some contention time.  However, if FK checks are
skipped if the field in question is not updated, what locks would there
be?  Are they taken even if the checks are not performed on some sort
of "be prepared" principle?

Vivek Khera, Ph.D.
+1-301-869-4449 x806


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: optimizing Postgres queries
Next
From: Stephan Szabo
Date:
Subject: Re: deferred foreign keys