pgsql: Use simplehash for backend-private buffer pin refcounts. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: Use simplehash for backend-private buffer pin refcounts.
Date
Msg-id E1w0jo4-003dzm-1m@gemulon.postgresql.org
Whole thread Raw
List 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@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(-)


pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pgsql: nbtree: Avoid allocating _bt_search stack.
Next
From: Álvaro Herrera
Date:
Subject: pgsql: Document the 'command' column of pg_stat_progress_repack