diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-02-21 17:06:41 +0530 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-02-21 17:06:41 +0530 |
commit | 88aca5662d6a6362ce8c5aba08f469e92f44a1e7 (patch) | |
tree | 03e5c98c36af9f075a7491065c8f19932d4bdaf3 /src | |
parent | d91a4a6c85d360678310470854d5d932d1833aa8 (diff) | |
download | postgresql-88aca5662d6a6362ce8c5aba08f469e92f44a1e7.tar.gz postgresql-88aca5662d6a6362ce8c5aba08f469e92f44a1e7.zip |
Fix incorrect decision about which lock to take.
Spotted by Tom Lane.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/lmgr/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 641ef1182b8..114fba0d384 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -1805,7 +1805,7 @@ BecomeLockGroupMember(PGPROC *leader, int pid) * initialization and never change thereafter; so we will acquire the * correct lock even if the leader PGPROC is in process of being recycled. */ - leader_lwlock = LockHashPartitionLockByProc(MyProc); + leader_lwlock = LockHashPartitionLockByProc(leader); LWLockAcquire(leader_lwlock, LW_EXCLUSIVE); /* Try to join the group */ |