mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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
|
||||
* 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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user