aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-11-04 15:31:46 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-11-04 15:31:46 +0200
commit1fe0466cf2cbb909b6553061620b6a6779319406 (patch)
tree0aad85777467f201d9e51f5242d6593090d20cb2 /src/backend/storage
parent99b937a44f087c133c4db42e1bf4a8990ea417b9 (diff)
downloadpostgresql-1fe0466cf2cbb909b6553061620b6a6779319406.tar.gz
postgresql-1fe0466cf2cbb909b6553061620b6a6779319406.zip
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
Diffstat (limited to 'src/backend/storage')
-rw-r--r--src/backend/storage/lmgr/lock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 59ca97ba025..b273ff1afd3 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -2258,9 +2258,8 @@ LockReleaseAll(LOCKMETHODID lockmethodid, bool allLocks)
while ((locallock = (LOCALLOCK *) hash_seq_search(&status)) != NULL)
{
/*
- * If the LOCALLOCK entry is unused, we must've run out of shared
- * memory while trying to set up this lock. Just forget the local
- * entry.
+ * If the LOCALLOCK entry is unused, something must've gone wrong
+ * while trying to acquire this lock. Just forget the local entry.
*/
if (locallock->nLocks == 0)
{