Re: timeout on lock feature

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: timeout on lock feature
Дата
Msg-id 4982.987184866@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: timeout on lock feature  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: timeout on lock feature  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I was thinking SET because UPDATE does an auto-lock.

Not to mention a ton of implicit locks acquired on various system tables
during parsing/planning.  You really want auto timeout on all of those?
I sure don't.

The appropriate way to do this given a LOCK TABLE option would be like
BEGIN;LOCK TABLE foo IN ROW EXCLUSIVE MODE WITH TIMEOUT n;UPDATE foo SET ...;COMMIT;

which restricts the scope of the timeout behavior to just the specific
lock that the user is thinking of, and doesn't risk breaking fundamental
system operations.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: timeout on lock feature
Следующее
От: ncm@zembu.com (Nathan Myers)
Дата:
Сообщение: Truncation of object names