On Thu, Mar 26, 2026 at 7:06 PM Bharath Rupireddy
<[email protected]> wrote:
> Thanks for sending the updated patch. It looks good to me. I verified
> it with the other thread patch - it fixes the SEGV.

To me, it seems like a bad idea for LockHasWaiters() to have the side
effect of adding entries to the main lock table. If nobody else has
moved our lock into the main lock table, it has no waiters. I think we
should just search LockMethodProcLockHash and see if we find anything,
and if not, return false without moving the lock.

Alternatively, if we don't need the functionality for anything, we
might just want LockHasWaiters() to assert
!EligibleForRelationFastPath(), and document the problem in a comment.

-- 
Robert Haas
EDB: http://www.enterprisedb.com


Reply via email to