pgsql: simplehash: Allow use of simplehash without MemoryContext.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: simplehash: Allow use of simplehash without MemoryContext.
Date: 2019-12-17 19:09:46
Message-ID: E1ihIE6-0006Fx-Hy@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

simplehash: Allow use of simplehash without MemoryContext.

If the SH_RAW_ALLOCATOR is defined, it will be used to allocate bytes
for the hash table, and no dependencies on MemoryContext will exist.
This means, in particular, that the SH_CREATE function will not take
a MemoryContext argument.

Patch by me, reviewed by Andres Freund.

Discussion: http://postgr.es/m/CA+Tgmob8oyh02NrZW=xCScB+5GyJ-jVowE3+TWTUmPF=FsGWTA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/48995040d5e7b1e9bac35d72aff326cae002219d

Modified Files
--------------
src/include/lib/simplehash.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2019-12-17 19:17:08 pgsql: simplehash: Allow for use in frontend code.
Previous Message Robert Haas 2019-12-17 18:59:21 Re: pgsql: Move interrupt-handling code into subroutines.