PostgreSQL's 16-slot fast-path lock array can bottleneck heavily-indexed tables
PostgreSQL takes a weak AccessShareLock on a table and every one of its indexes each time it plans a query, even indexes the plan doesn't end up using. Through version 17, each backend can only record 16 such locks in a private fast-path array before overflowing into the shared lock table, which is guarded by 16 LWLock partitions that become contention points under heavy concurrent load.