Re: Creating a DSA area to provide work space for parallel execution - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Creating a DSA area to provide work space for parallel execution
Date
Msg-id CAEepm=1KXKe-pVAHMBxJECziJTc_GOTfybkU3H_S9r1nT5QTZQ@mail.gmail.com
Whole thread Raw
In response to Re: Creating a DSA area to provide work space for parallel execution  (Dilip Kumar <dilipbalaut@gmail.com>)
Responses Re: Creating a DSA area to provide work space for parallel execution  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On Fri, Nov 25, 2016 at 4:32 AM, Dilip Kumar <dilipbalaut@gmail.com> wrote:
> I have one more question,
>
> In V1 we were calling dsa_detach in ExecParallelCleanup and in
> ParallelQueryMain, but it's removed in v2.
>
> Any specific reason ?
> Does this need to be used differently ?
>
>  ExecParallelCleanup(ParallelExecutorInfo *pei)
>  {
> + if (pei->area != NULL)
> + {
> + dsa_detach(pei->area);
> + pei->area = NULL;
> + }
>
> After this changes, I am getting DSM segment leak warning.

Thanks!  I had some chicken-vs-egg problems dealing with cleanup of
DSM segments belonging to DSA areas created inside DSM segments.
Here's a new version to apply on top of dsa-v7.patch.

--
Thomas Munro
http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Dynamic shared memory areas
Next
From: Michael Paquier
Date:
Subject: Re: make default TABLESPACE belong to target table.