Make some minor improvements in memory-context infrastructure.
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/hash/dynahash.c | modified | +4 −9 |
| src/backend/utils/mmgr/mcxt.c | modified | +50 −33 |
| src/include/utils/palloc.h | modified | +2 −0 |
Discussion
- Modernizing our GUC infrastructure 18 messages · 2022-09-05 → 2022-10-07