Re: Foreign key order evaluation - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Foreign key order evaluation
Date
Msg-id 20040929005151.GA6475@winnie.fuhr.org
Whole thread Raw
In response to Re: Foreign key order evaluation  (Randy Yates <yates@ieee.org>)
List pgsql-general
On Tue, Sep 28, 2004 at 10:27:21PM +0000, Randy Yates wrote:

> I see the light. You mean it would be nice to be able to have a "LOCK-FOR-UPDATE-ONLY"
> lock as well as a "LOCK-FOR-UPDATE-OR-READ" lock, but all you have now is
> "LOCK-FOR-UPDATE-OR-READ" and that gets applied even when you don't care if
> someone else reads the record?

Right.  The current implementation acquires an exclusive lock (FOR
UPDATE -- what you're referring to as LOCK-FOR-UPDATE-OR-READ); it
would be nice to have a lock that could be shared so multiple
transactions could acquire it at the same time without blocking.
Then all transactions could read the foreign key record, but no
transaction could modify it until the other transactions completed
and released their locks.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: doubt about the database
Next
From: Michael Fuhr
Date:
Subject: Re: Foreign key order evaluation