Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 88aca56

Browse files
committed
Fix incorrect decision about which lock to take.
Spotted by Tom Lane.
1 parent d91a4a6 commit 88aca56

File tree

1 file changed

+1
-1
lines changed
  • src/backend/storage/lmgr

1 file changed

+1
-1
lines changed

src/backend/storage/lmgr/proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,7 @@ BecomeLockGroupMember(PGPROC *leader, int pid)
18051805
* initialization and never change thereafter; so we will acquire the
18061806
* correct lock even if the leader PGPROC is in process of being recycled.
18071807
*/
1808-
leader_lwlock = LockHashPartitionLockByProc(MyProc);
1808+
leader_lwlock = LockHashPartitionLockByProc(leader);
18091809
LWLockAcquire(leader_lwlock, LW_EXCLUSIVE);
18101810

18111811
/* Try to join the group */

0 commit comments

Comments
 (0)