Skip site navigation (1) Skip section navigation (2)

foreign key check makes a big LOCK

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: foreign key check makes a big LOCK
Date: 2000-12-05 20:35:32
Message-ID: 200012052035.eB5KZW438781@hub.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Szima Gabor (sygma(at)marr(dot)irisz(dot)hu) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
foreign key check makes a big LOCK

Long Description
in: src/backend/utils/adt/ri_triggers.c

RI_FKey_check(), RI_FKey_noaction_upd(), RI_FKey_noaction_del(), etc..
checking the referential with SELECT FOR UPDATE.

After BEGIN TRANSACTION: the INSERT/DELETE/UPDATE calling foreign-key checks, and the SELECT FOR UPDATE locking ALL matched rows in referential table.

I modify ri_triggers.c (remove "FOR UPDATE"). This working.. but is correct?


Sample Code


No file was uploaded with this report


pgsql-bugs by date

Next:From: Tom LaneDate: 2000-12-05 20:42:54
Subject: Re: Rules with Conditions: Still Doesn't Work (Bug Rpt)
Previous:From: Joel BurtonDate: 2000-12-05 20:26:37
Subject: Re: Rules with Conditions: Still Doesn't Work (Bug Rpt)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group