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+TgmobcKsMw4wQK+0Rz96zSVnDzsUo2x+RPOEYqaVFg9ejBCw@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
List pgsql-hackers
On Wed, May 31, 2017 at 11:16 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> I agree with you. But, if I understand the use case correctly we need
> to store the TupleDesc for the RECORD in shared hash so that it can be
> shared across multiple processes.  I think this can be achieved with
> the simplehash as well.
>
> For getting this done, we need some fixed shared memory for holding
> static members of SH_TYPE and the process which creates the simplehash
> will be responsible for copying these static members to the shared
> location so that other processes can access the SH_TYPE.  And, the
> dynamic part (the actual hash entries) can be allocated using DSA by
> registering SH_ALLOCATE function.

Well, SH_TYPE's members SH_ELEMENT_TYPE *data and void *private_data
are not going to work in DSM, because they are pointers.  You can
doubtless come up with a way around that problem, but I guess the
question is whether that's actually any better than just using DHT.

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Proposal : For Auto-Prewarm.
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x