]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use simplehash for backend-private buffer pin refcounts.
authorPeter Geoghegan <pg@bowt.ie>
Thu, 12 Mar 2026 17:26:16 +0000 (13:26 -0400)
committerPeter Geoghegan <pg@bowt.ie>
Thu, 12 Mar 2026 17:26:16 +0000 (13:26 -0400)
commita367c433ad015b889ee296b07de00017819915c4
tree6b3f0926d707478489c207123156194d6d55fa89
parentd071e1cfec23505e0f55f06988c0144f16235586
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 <pg@bowt.ie>
Suggested-by: Andres Freund <andres@anarazel.de>
Reviewed-By: Tomas Vondra <tomas@vondra.me>
Reviewed-By: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CAH2-Wz=g=JTSyDB4UtB5su2ZcvsS7VbP+ZMvvaG6ABoCb+s8Lw@mail.gmail.com
src/backend/storage/buffer/bufmgr.c
src/tools/pgindent/typedefs.list