> > Why would the access frequency be uniform? In particular, there's a huge > variability in how long the locks need to exist >
As a supporting data point, our example production workload shows a 3x difference between the most versus least frequently contended lock_manager lock: https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/2301#note_1365630726 Since we deterministically distribute relations among those 16 lock_manager lwlocks by hashing their lock tag, we can probably assume a roughly uniform number of relations are being managed by each lock_manager lock, but the demand (and contention) for them is non-uniform. This 3x spread corroborates the intuition that some relations are locked more frequently than others (that being both a schema- and workload-specific property). Since we're contemplating a new hashing scheme, I wonder how we could accommodate that kind of asymmetry, where some relations are locked more frequently than others.