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