LwLockRelease performance - Mailing list pgsql-performance

From Ashkil Dighin
Subject LwLockRelease performance
Date
Msg-id CAH6zzqCqZGqwDBWQqHb=XSVMyRBHBE+bh5sVnrQe-UE0uabwtg@mail.gmail.com
Whole thread Raw
Responses Re: LwLockRelease performance
Re: LwLockRelease performance
List pgsql-performance
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 WAiting for the lock to be released 
Is any possible solution like 
1. LWLockRelease() releases the lock first and then remove held lock from the array
2. Binary search (like non-linear structure) to reduce on high searching and remove all held locks 

pgsql-performance by date:

Previous
From: pgsql-performance@jhacker.de
Date:
Subject: pg_trgm word_similarity query does not use index for input strings longer than 8 characters
Next
From: Tom Lane
Date:
Subject: Re: LwLockRelease performance