From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make some minor improvements in memory-context infrastructure.
Date: Fri, 14 Oct 2022 16:36:28 +0000
Message-ID: <E1ojNff-002MLu-Mh@gemulon.postgresql.org> (raw)
Make some minor improvements in memory-context infrastructure.
We lack a version of repalloc() that supports MCXT_ALLOC_NO_OOM
semantics, so invent repalloc_extended() with the usual set of
flags. repalloc_huge() becomes a legacy wrapper for that.
Also, fix dynahash.c so that it can support HASH_ENTER_NULL
requests when using the default palloc-based allocator.
The only reason it didn't do that already was the lack of the
MCXT_ALLOC_NO_OOM option when that code was written, ages ago.
While here, simplify a few overcomplicated tests in mcxt.c.
Discussion: https://postgr.es/m/2982579.1662416866@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9c911ec065df0f660e3add65d986f95928914375
Modified Files
--------------
src/backend/utils/hash/dynahash.c | 13 ++----
src/backend/utils/mmgr/mcxt.c | 83 +++++++++++++++++++++++----------------
src/include/utils/palloc.h | 2 +
3 files changed, 56 insertions(+), 42 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Make some minor improvements in memory-context infrastructure.
In-Reply-To: <E1ojNff-002MLu-Mh@gemulon.postgresql.org>
References: <E1ojNff-002MLu-Mh@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