From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Vivek Khera <khera@kcilink.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: deferred foreign keys
Date: Mon, 5 Jan 2004 11:48:26 -0800 (PST)
Message-ID: <20040105114730.U73612@megazone.bigpanda.com> (raw)
In-Reply-To: <A4624C54-3FB1-11D8-A8A5-000A9578CFCC@kcilink.com>
References: <x7brpruzwq.fsf@yertle.int.kciLink.com>
<x73cb0c3ep.fsf@yertle.int.kciLink.com>
<3FF4FA25.7050802@familyhealth.com.au>
<x7isjqcq3f.fsf@yertle.int.kciLink.com>
<20040105183859.GA28448@wolff.to>
<20040105105401.C72490@megazone.bigpanda.com>
<A4624C54-3FB1-11D8-A8A5-000A9578CFCC@kcilink.com>
On Mon, 5 Jan 2004, Vivek Khera wrote:
>
> On Jan 5, 2004, at 1:57 PM, Stephan Szabo wrote:
>
> > 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.
> >
>
> I'm not *sure* it is taking any locks. The transactions appear to be
> running lock step (operating on different parts of the same pair of
> tables) and I was going to see if deferring the locks made the
> difference. It is my feeling now that it will not. However, if there
> is a way to detect if locks are being taken, I'll do that. I'd like to
> avoid dropping and recreating the foreign keys if I can since it takes
> up some bit of time on the table with 20+ million rows.
The only way I can think of to see the locks is to do just one of the
operations and then manually attempting to select for update the
associated pk row.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sszabo@megazone.bigpanda.com, khera@kcilink.com
Subject: Re: deferred foreign keys
In-Reply-To: <20040105114730.U73612@megazone.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox