Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I envisioned:

> 	SET TIMEOUT TO 10;
> 	UPDATE tab SET col = 3;
> 	RESET TIMEOUT

> Can't we get that work work properly?  Let the timeout only apply to the
> 'tab' table and none of the others.

As Henryk has implemented it, it WON'T only apply to the 'tab' table;
it'll affect all locks grabbed anywhere, including those that the system
locks internally.  That scares the heck out of me, Andreas' objections
notwithstanding.

> Can't we exclude system tables from being affected by the timeout?

How will you do that?  The lock manager makes a point of not knowing the
semantics associated with any particular lock tag.  It's even less
likely to know the difference between a "system" grab and a "user" grab
on what might be the very same lock (consider an "UPDATE pg_class"
command).

> Requiring a LOCK statement that matches
> the UPDATE/DELETE and wrapping the whole thing in a transaction seems
> needlessly complex to me.

As opposed to your three-step proposal above?  That doesn't look
very much simpler to me...

			regards, tom lane

Tue, 17 Apr 2001 11:16:54 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: AW: timeout on lock feature 