Skip to content

Commit 1fe0466

Browse files
committed
Fix comment in LockReleaseAll() on when locallock->nLock can be zero
We reach this case also e.g. when a deadlock is detected, not only when we run out of memory. Reviewed-by: Maxim Orlov Discussion: https://www.postgresql.org/message-id/7c2090cd-a72a-4e34-afaa-6dd2ef31440e@iki.fi
1 parent 99b937a commit 1fe0466

File tree

1 file changed

+2
-3
lines changed
  • src/backend/storage/lmgr

1 file changed

+2
-3
lines changed

src/backend/storage/lmgr/lock.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,9 +2258,8 @@ LockReleaseAll(LOCKMETHODID lockmethodid, bool allLocks)
22582258
while ((locallock = (LOCALLOCK *) hash_seq_search(&status)) != NULL)
22592259
{
22602260
/*
2261-
* If the LOCALLOCK entry is unused, we must've run out of shared
2262-
* memory while trying to set up this lock. Just forget the local
2263-
* entry.
2261+
* If the LOCALLOCK entry is unused, something must've gone wrong
2262+
* while trying to acquire this lock. Just forget the local entry.
22642263
*/
22652264
if (locallock->nLocks == 0)
22662265
{

0 commit comments

Comments
 (0)