Re: Read Lock For Foreign Key

From: Jon Swinth <jswinth(at)atomicpc(dot)com>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Read Lock For Foreign Key
Date: 2002-08-13 19:26:41
Message-ID: 200208131926.g7DJQfM02610@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for your reply Stephan. I am glad that you have placed this on your
own todo list. I am not a fan of using triggers for foreign key constraints.
I think foreign keys are too much an integrel part of the DB to be simple
trigger code. It also make the description of tables rather messy. However,
I am not in a place to complain about how things are implemented because I
cannot help with an alternative.

I do hope we can get this on the official todo list so that everyone agrees
that it is needed.

On Tuesday 13 August 2002 12:15 pm, Stephan Szabo wrote:
> On Tue, 13 Aug 2002, Jon Swinth wrote:
> > How come having foreign keys take out a read lock on a parent row rather
> > than a write lock is not on the todo list? I had someone tell me that
> > this is difficult because the SQL standard does not include syntax for
> > read lock. Does the fact that it will be difficult mean that it isn't
> > needed?
>
> Well, dealing with the locking may not be on the official TODO list but
> it's on mine but I don't have alot of time to work on stuff so it's in the
> eventual future. Just switching to a read lock may not actually fix some
> of the deadlock issues that could be solved by switching up some details
> of how the triggers work. But, each solution takes a bunch of time to
> check possible failure cases either direction (towards deadlock or towards
> an unsatisfied constraint).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Clift 2002-08-13 19:44:08 Re: O'Reilly Open Source Convention Report
Previous Message Jan Wieck 2002-08-13 19:26:15 Re: O'Reilly Open Source Convention Report