Re: do foreign key checks lock parent table ?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: <swalker(at)iglou(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: do foreign key checks lock parent table ?
Date: 2002-04-03 16:35:46
Message-ID: 20020403083359.C92483-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 3 Apr 2002 swalker(at)iglou(dot)com wrote:

>
> So turning intially deferred on is a suitable solution? It seems
> to work OK in this simple test case.

That'll hide this particular locking issue (since the locks are held
for much less time in that case). There are some issues with
initially deferred constraints right now in some cases if you're
doing actions on both tables in one transaction (like deleting a
pk row and then re-adding it).

>
> On Tue, 2 Apr 2002, Stephan Szabo wrote:
> > The locks being grabbed are a bit stronger than they need to be
> > (if you want more info, there was a bit of discussion on -hackers
> > recently). The updates should block updates on parent of the
> > referenced row but don't need to block other child updates but there's
> > no current lock level that is quite right.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas T. Thai 2002-04-03 16:43:15 Re: Postgres/PHP, Apache child processes dying
Previous Message Tom Lane 2002-04-03 16:35:30 Re: [HACKERS] Re : Solaris Performance - Profiling (Solved)