agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add dshash_get_dsa_area(), able to retrieve the DSA area of a ds
Date: Mon, 03 Aug 2026 11:06:18 +0000
Message-ID: <E1wqqUs-00000001V04-40TP@gemulon.postgresql.org> (raw)
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@gmail.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(+)
Message-ID: <E1wqqUs-00000001V04-40TP@gemulon.postgresql.org>
Permalink: ../E1wqqUs-00000001V04-40TP@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wqqUs-00000001V04-40TP@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add dshash_get_dsa_area(), able to retrieve the DSA area of a ds
In-Reply-To: <E1wqqUs-00000001V04-40TP@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox