We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7911e78 commit 5099e8eCopy full SHA for 5099e8e
src/backend/storage/lmgr/lwlock.c
@@ -1781,15 +1781,14 @@ LWLockRelease(LWLock *lock)
1781
* be the latest-acquired lock; so search array backwards.
1782
*/
1783
for (i = num_held_lwlocks; --i >= 0;)
1784
- {
1785
if (lock == held_lwlocks[i].lock)
1786
1787
- mode = held_lwlocks[i].mode;
1788
break;
1789
- }
1790
+
1791
if (i < 0)
1792
elog(ERROR, "lock %s %d is not held", T_NAME(lock), T_ID(lock));
+ mode = held_lwlocks[i].mode;
1793
num_held_lwlocks--;
1794
for (; i < num_held_lwlocks; i++)
1795
held_lwlocks[i] = held_lwlocks[i + 1];
0 commit comments