Content-Length: 263380 | pFad | http://github.com/postgrespro/postgres/commit/1fe0466cf2cbb909b6553061620b6a6779319406

DD Fix comment in LockReleaseAll() on when locallock->nLock can be zero · postgrespro/postgres@1fe0466 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/1fe0466cf2cbb909b6553061620b6a6779319406

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy