Move lwlock-release probe back where it belongs
The documentation specifically states that lwlock-release fires before
any released waiters have been awakened. It worked that way until
ab5194e6f6
, where is seems to have been
misplaced accidentally. Move it back where it belongs.
Author: Craig Ringer <craig.ringer@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/CAGRY4nwxKUS_RvXFW-ugrZBYxPFFM5kjwKT5O+0+Stuga5b4+Q@mail.gmail.com
This commit is contained in:
parent
882b2cdc08
commit
96ae658e62
|
@ -1840,6 +1840,7 @@ LWLockRelease(LWLock *lock)
|
||||||
/* nobody else can have that kind of lock */
|
/* nobody else can have that kind of lock */
|
||||||
Assert(!(oldstate & LW_VAL_EXCLUSIVE));
|
Assert(!(oldstate & LW_VAL_EXCLUSIVE));
|
||||||
|
|
||||||
|
TRACE_POSTGRESQL_LWLOCK_RELEASE(T_NAME(lock));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We're still waiting for backends to get scheduled, don't wake them up
|
* We're still waiting for backends to get scheduled, don't wake them up
|
||||||
|
@ -1863,8 +1864,6 @@ LWLockRelease(LWLock *lock)
|
||||||
LWLockWakeup(lock);
|
LWLockWakeup(lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE_POSTGRESQL_LWLOCK_RELEASE(T_NAME(lock));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now okay to allow cancel/die interrupts.
|
* Now okay to allow cancel/die interrupts.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue