Concurrency and locks

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Concurrency and locks
Дата
Msg-id 006601c2d836$2e8cacc0$0102a8c0@mascari.com
обсуждение исходный текст
Ответы Re: Concurrency and locks  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Is it possible, or could it be made possible in the future, for
a ROW locking mechanism whereby:

Transaction #1

BEGIN;
SELECT key FROM foo WHERE key = 1 FOR ????;

 returns immediately with '1'

Transaction #2

BEGIN;
SELECT key FROM foo WHERE key = 1 FOR ????;

 returns immediately with '1' <-- Not blocked by #1

Transaction #3

BEGIN;
UPDATE foo SET key = 2 WHERE key = 1; <-- Blocks

If one wants to guarantee consistency in user-defined BEFORE
INSERT/UPDATE triggers and trigger procedures, at the moment, is
the only recourse SELECT FOR UPDATE? Is this the cause of
performance problems with the current RI implementation?

Mike Mascari
mascarm@mascari.com



В списке pgsql-general по дате отправления:

Предыдущее
От: Guy Fraser
Дата:
Сообщение: Has the attribute name for oid changed in pgsql 7.3 ?
Следующее
От: Greg Copeland
Дата:
Сообщение: Re: Table Partitioning in Postgres: