| From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Use simplehash for backend-private buffer pin refcounts. |
| Date: | 2026-03-12 17:26:44 |
| Message-ID: | E1w0jo4-003dzm-1m@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)bowt(dot)ie>
Suggested-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-By: Tomas Vondra <tomas(at)vondra(dot)me>
Reviewed-By: Andres Freund <andres(at)anarazel(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2026-03-12 18:23:35 | pgsql: Document the 'command' column of pg_stat_progress_repack |
| Previous Message | Peter Geoghegan | 2026-03-12 17:22:47 | pgsql: nbtree: Avoid allocating _bt_search stack. |