Re: LwLockRelease performance

2021-12-02 Thread Andres Freund
Hi, On 2021-12-01 19:56:11 +0530, Ashkil Dighin wrote: > The performance bottleneck in LWLockRelease()method goes through an array > one by one to see which lock was released with O(N). As soon as the lock is > found it performs an array to remove the lock. > As linear search and compaction delays

Re: LwLockRelease performance

2021-12-02 Thread Tom Lane
Ashkil Dighin writes: > The performance bottleneck in LWLockRelease()method goes through an array > one by one to see which lock was released with O(N). As soon as the lock is > found it performs an array to remove the lock. Typically, such locks are released in LIFO order. Do you have any actua

LwLockRelease performance

2021-12-02 Thread Ashkil Dighin
Hi The performance bottleneck in LWLockRelease()method goes through an array one by one to see which lock was released with O(N). As soon as the lock is found it performs an array to remove the lock. As linear search and compaction delays the release of the lock forcing the other Postgres instances