pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use simplehash for backend-private buffer pin refcounts.
Date: Thu, 12 Mar 2026 17:26:44 +0000
Message-ID: <E1w0jo4-003dzm-1m@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1w0jo4-003dzm-1m@gemulon.postgresql.org>
Permalink:  ../E1w0jo4-003dzm-1m@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w0jo4-003dzm-1m@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: pg@bowt.ie, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use simplehash for backend-private buffer pin refcounts.
  In-Reply-To: <E1w0jo4-003dzm-1m@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox