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

Re: Referential Integrity and SHARE locks

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Referential Integrity and SHARE locks
Date: 2007-02-02 11:01:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> You say below the cut that you're not updating keys, so presumably it's 
> other columns. Which leads me to something I've wondered for a while - 
> why do we lock the whole row? Is it just a matter of "not optimised that 
> yet" or is there a good reason why locking just some columns isn't 
> practical.

For the conditions of generating the deadlock, see:

The reason of the occasional orphan rows is not completely clear to me,
but it must be some kind of race condition while
inserting/deleting/?updating concurrently the parent/child tables.


In response to


pgsql-hackers by date

Next:From: Florian G. PflugDate: 2007-02-02 12:04:12
Subject: Re: Referential Integrity and SHARE locks
Previous:From: Hannu KrosingDate: 2007-02-02 10:26:49
Subject: Re: A more general approach (Re: Dataarchiving/warehousing idea)

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