Skip to content

Commit 96ae658

Browse files
committed
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 ab5194e, 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
1 parent 882b2cd commit 96ae658

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/backend/storage/lmgr/lwlock.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,6 +1840,7 @@ LWLockRelease(LWLock *lock)
18401840
/* nobody else can have that kind of lock */
18411841
Assert(!(oldstate & LW_VAL_EXCLUSIVE));
18421842

1843+
TRACE_POSTGRESQL_LWLOCK_RELEASE(T_NAME(lock));
18431844

18441845
/*
18451846
* We're still waiting for backends to get scheduled, don't wake them up
@@ -1863,8 +1864,6 @@ LWLockRelease(LWLock *lock)
18631864
LWLockWakeup(lock);
18641865
}
18651866

1866-
TRACE_POSTGRESQL_LWLOCK_RELEASE(T_NAME(lock));
1867-
18681867
/*
18691868
* Now okay to allow cancel/die interrupts.
18701869
*/

0 commit comments

Comments
 (0)