> [!ShmemIndex] > <table><tr><td rowspan="4" width="25%"><img src="assets/wl_lw_shmemindex.png"></td><td><b>Wait Category</b></td><td>LWLock</td></tr><tr><td><b>Mechanism</b></td><td><code>ShmemIndexLock</code></td></tr><tr><td><b>Operations</b></td><td><a href="Operations/Other/FunctionScan">FunctionScan</a></td></tr><tr><td><b>Resources</b></td><td><a href="Resources/RAM">Memory</a>, <a href="Resources/CPU">CPU</a></td></tr><tr><td colspan="3">Contention on the <b>Resource Allocation Layer</b> of shared memory. To ensure that different parts of the engine (and loaded extensions) don't overwrite each other, Postgres uses the <code>ShmemIndex</code> to serialize the "claiming" of shared memory blocks.</td></tr></table>