Bruce Momjian <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to