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 | 
| Список | 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 по дате отправления: