Commit 96ae658e authored by Peter Eisentraut's avatar Peter Eisentraut

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
ab5194e6, 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
parent 882b2cdc
...@@ -1840,6 +1840,7 @@ LWLockRelease(LWLock *lock) ...@@ -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) ...@@ -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.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment