Re: deferred foreign keys

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: Vivek Khera <khera(at)kcilink(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: deferred foreign keys
Date: 2004-01-05 18:57:02
Message-ID: 20040105105401.C72490@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, 5 Jan 2004, Bruno Wolff III wrote:

> On Mon, Jan 05, 2004 at 11:33:40 -0500,
> Vivek Khera <khera(at)kcilink(dot)com> wrote:
> >
> > Thanks. Then it sorta makes it moot for me to try deferred checks,
> > since the Pimary and Foreign keys never change once set. I wonder
> > what is making the transactions appear to run lockstep, then...
>
> 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.

But, if he's updating the fk table but not the keyed column, it should no
longer be doing the check and grabbing the locks. If he's seeing it grab
the row locks still a full test case would be handy because it'd probably
mean we missed something.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Vivek Khera 2004-01-05 18:57:07 Re: deferred foreign keys
Previous Message Tom Lane 2004-01-05 18:52:40 Re: optimizing Postgres queries