aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2015-09-22 11:05:48 +0200
committerAndres Freund <andres@anarazel.de>2015-09-22 11:12:28 +0200
commit62e503b0c29bbb9e0ac7ebce6990bf3c7c3c9a89 (patch)
treec03618b9d8b8068d1cae6390bd0ed923e0d209a4 /src/backend/storage
parent265728e1b60858f9db8a3e7fb538477a28fc74a3 (diff)
downloadpostgresql-62e503b0c29bbb9e0ac7ebce6990bf3c7c3c9a89.tar.gz
postgresql-62e503b0c29bbb9e0ac7ebce6990bf3c7c3c9a89.zip
Correct value of LW_SHARED_MASK.
The previous wrong value lead to wrong LOCK_DEBUG output, never showing any shared lock holders. Reported-By: Alexander Korotkov Discussion: CAPpHfdsPmWqz9FB0AnxJrwp1=KLF0n=-iB+QvR0Q8GSmpFVdUQ@mail.gmail.com Backpatch: 9.5, where the bug was introduced.
Diffstat (limited to 'src/backend/storage')
-rw-r--r--src/backend/storage/lmgr/lwlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index 687ed6399cb..7b8fb71ead3 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -107,7 +107,7 @@ extern slock_t *ShmemLock;
#define LW_LOCK_MASK ((uint32) ((1 << 25)-1))
/* Must be greater than MAX_BACKENDS - which is 2^23-1, so we're fine. */
-#define LW_SHARED_MASK ((uint32)(1 << 23))
+#define LW_SHARED_MASK ((uint32) ((1 << 24)-1))
/*
* This is indexed by tranche ID and stores metadata for all tranches known