Re: [HACKERS] POC: Sharing record typmods between backends - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] POC: Sharing record typmods between backends
Date
Msg-id CA+TgmobBiHK9huYxA6ErKwhNiUAMWvWCdxN74fb=2uo=diSOvw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] POC: Sharing record typmods between backends  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: [HACKERS] POC: Sharing record typmods between backends  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
On Tue, May 30, 2017 at 2:45 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> On Tue, May 30, 2017 at 1:09 AM, Thomas Munro
> <thomas.munro@enterprisedb.com> wrote:
>>> * Perhaps simplehash + an LWLock would be better than dht, but I
>>> haven't looked into that.  Can it be convinced to work in DSA memory
>>> and to grow on demand?
>
> Simplehash provides an option to provide your own allocator function
> to it. So in the allocator function, you can allocate memory from DSA.
> After it reaches some threshold it expands the size (double) and it
> will again call the allocator function to allocate the bigger memory.
> You can refer pagetable_allocate in tidbitmap.c.

That only allows the pagetable to be shared, not the hash table itself.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces