Here is a new series adding a single pg_wait_for_lockers() function that takes a boolean argument to control the interpretation of the lock mode. It omits LOCK's handling of descendant tables so it requires permissions directly on descendants in order to wait for locks on them. Not sure if that would be a problem for anyone.
v6-0001-Refactor-GetLockConflicts-into-more-general-GetLo.patch
Description: Binary data
v6-0002-Allow-specifying-single-lockmode-in-WaitForLocker.patch
Description: Binary data
v6-0003-Add-pg_wait_for_lockers-function.patch
Description: Binary data