Re: Foreign key order evaluation

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Foreign key order evaluation
Дата
Msg-id 20040929005151.GA6475@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Foreign key order evaluation  (Randy Yates <yates@ieee.org>)
Список 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 по дате отправления:

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: doubt about the database
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Foreign key order evaluation