time out in blocking - Mailing list pgsql-general

From Kent Tong
Subject time out in blocking
Date
Msg-id 200002040315.WAA03545@hub.org
Whole thread Raw
List pgsql-general
Hi,

I am experimenting with the serializable isolation level. If two
such transactions try to execute an UPDATE on the same record in
tandem, then the latter will be blocked forever until the former
rolls back or commits.

Is there any way to set a time out so that the latter will return
an error earlier? The rationale is that, if two users are trying
to edit the same record, then one of them will be kept waiting until
the other user OKs or cancels his own edit dialog. For the unforunate
user, the app will appear to have freezed. This creates a very bad
experience on the user.

Any idea to get this time out effect?

Thanks in advance!
--
Kent Tong, M.Sc., MCSE, MCP+I
FREE advice to enhance your business with IT
FREE catalogue of IT products in the Macau market
Go to http://www.cpttm.org.mo/itob NOW!


pgsql-general by date:

Previous
From: "Kent Tong"
Date:
Subject: blocking with time out?
Next
From: mathprof@bigfoot.com
Date:
Subject: DefineQueryRewrite: rule plan string too big-- workaround?