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: 1170414114.3101.81.camel@coppola.muc.ecircle.de (view raw or flat)
Thread:
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:

http://archives.postgresql.org/pgsql-general/2006-12/msg00029.php

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.

Cheers,
Csaba.



In response to

Responses

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-2014 The PostgreSQL Global Development Group