| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add dshash_get_dsa_area(), able to retrieve the DSA area of a ds |
| Date: | 2026-08-03 11:06:18 |
| Message-ID: | E1wqqUs-00000001V04-40TP@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Add dshash_get_dsa_area(), able to retrieve the DSA area of a dshash table
Code using GetNamedDSHash() to retrieve a dshash table may also want to
limit its size, but there is actually no easy way to do so because the
dsa_area of a hash table is hidden within dshash.c.
This commit adds dshash_get_dsa_area() to close the gap, which returns
the dsa_area for a given dshash_table. The DSA area retrieved can then
be passed to dsa_set_size_limit(), to limit its size. This accessor
routine also opens the door for allocating additional objects in the
same DSA area as a hash table, which may be useful for some.
Author: Sami Imseih <samimseih(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAA5RZ0tKfCVqFnMZtavM42H63ha2Haf_C4mbJNWqkaW30cPW1w@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/762e329e83f2194969a6ea859ddd08361a18ac98
Modified Files
--------------
src/backend/lib/dshash.c | 11 +++++++++++
src/include/lib/dshash.h | 1 +
2 files changed, 12 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2026-08-03 11:53:47 | pgsql: Remove unused arg and dead code in set_attnotnull() |
| Previous Message | Fujii Masao | 2026-08-03 10:05:30 | pgsql: doc: Clarify VERBOSE output for ANALYZE and VACUUM |