statement_timeout is not a solution if many processes are waiting the resource.
Why not?
I think the only problem with using statement_timeout for this purpose is that the client connection might die during a long-running transaction at a point when no statement is currently executing. Tom's suggested transaction_timeout would be a reasonable way to fix this. Adnan, if you think this is such a significant problem (I can't say that I agree), I'd encourage you to submit a patch.
-Neil
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org