Use simplehash for backend-private buffer pin refcounts. Replace dynahash with simplehash for the per-backend PrivateRefCountHash overflow table. Simplehash generates inlined, open-addressed lookup code, avoiding the per-call overhead of dynahash that becomes noticeable when many buffers are pinned with a CPU-bound workload.
Motivated by testing of the index prefetching patch, which pins many more buffers concurrently than typical index scans. Author: Peter Geoghegan <[email protected]> Suggested-by: Andres Freund <[email protected]> Reviewed-By: Tomas Vondra <[email protected]> Reviewed-By: Andres Freund <[email protected]> Discussion: https://postgr.es/m/CAH2-Wz=g=jtsydb4utb5su2zcvss7vbp+zmvvag6abocb+s...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/a367c433ad015b889ee296b07de00017819915c4 Modified Files -------------- src/backend/storage/buffer/bufmgr.c | 68 +++++++++++++++++++------------------ src/tools/pgindent/typedefs.list | 2 ++ 2 files changed, 37 insertions(+), 33 deletions(-)
