bufmgr: Separate keys for private refcount infrastructure

Andres Freund <andres@anarazel.de>

Commit: edbaaea0a95ef1c32ffe8aa62e1556588c7a714b
Author: Andres Freund <andres@anarazel.de>
Date: 2025-12-14T18:09:43Z
bufmgr: Separate keys for private refcount infrastructure

This makes lookups faster, due to allowing auto-vectorized lookups. It is also
beneficial for an upcoming patch, independent of auto-vectorization, as the
upcoming patch wants to track more information for each pinned buffer, making
the existing loop, iterating over an array of PrivateRefCountEntry, more
expensive due to increasing its size.

Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/fvfmkr5kk4nyex56ejgxj3uzi63isfxovp2biecb4bspbjrze7@az2pljabhnff

Files

PathChange+/−
src/backend/storage/buffer/bufmgr.c modified +96 −45
src/tools/pgindent/typedefs.list modified +1 −0

Discussion