Re: PL/pgsql locking policy

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PL/pgsql locking policy
Дата
Msg-id 17605.1017043620@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PL/pgsql locking policy  (Richard Emberson <emberson@phc.net>)
Список pgsql-general
Richard Emberson <emberson@phc.net> writes:
> If you have a PL/pgsql procedure that first reads from a given table to
> verify a condition and
> then if the condition is true write to that same table ... and at the
> same time you want other
> processes to be able to simply read from the table, what is the best
> locking policy within the procedure?

You could use EXCLUSIVE lock mode, which blocks everything except SELECT.

            regards, tom lane

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

Предыдущее
От: tony
Дата:
Сообщение: Register article
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Another notify question