Joshua Daniel Franklin <joshua(at)iocc(dot)com> writes:
> Obviously I'm missing something here.
I think you forgot to issue a "BEGIN;" to open a transaction block.
The lock created by FOR UPDATE (or any other lock) is only held till
transaction commit.
regards, tom lane