Обсуждение: pgsql: Use simplehash for backend-private buffer pin refcounts.
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 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(-)