Fix incorrect decision about which lock to take.
Spotted by Tom Lane.
This commit is contained in:
parent
d91a4a6c85
commit
88aca5662d
@ -1805,7 +1805,7 @@ BecomeLockGroupMember(PGPROC *leader, int pid)
|
|||||||
* initialization and never change thereafter; so we will acquire the
|
* initialization and never change thereafter; so we will acquire the
|
||||||
* correct lock even if the leader PGPROC is in process of being recycled.
|
* 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);
|
LWLockAcquire(leader_lwlock, LW_EXCLUSIVE);
|
||||||
|
|
||||||
/* Try to join the group */
|
/* Try to join the group */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user