John Stanton <[EMAIL PROTECTED]> wrote:
How about the case of: BEGIN sets reserved lock on thread one
You mean BEGIN IMMEDIATE, right?
SELECT promotes lock to shared on thread one
I'm not sure what you mean by "promotes" here. If anything, RESERVED lock is a superset of SHARED, not the other way round. SELECT statement most definitely does not cause a transaction that started with BEGIN IMMEDIATE to release its RESERVED lock.
BEGIN sets reserved lock from thread two
It can't. Thread one already holds a RESERVED lock. Only one thread can acquire such.
SELECT promotes reserved lock in thread two to shared
Wrong. See above.
INSERT tries to promote shared lock to exclusive on thread one but fails because second thread holds a shared lock
This statement doesn't make any sense to me, sorry. It bears no relationship to reality, so I don't even know where to begin to disprove it.
My understanding is that once a reserved lock has been promoted to shared
A reserved lock is never "promoted" to shared. Whatever gave you this idea?
Igor Tandetnik
----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------