Re: why doesn't DestroyPartitionDirectory hash_destroy? - Mailing list pgsql-hackers

From Amit Langote
Subject Re: why doesn't DestroyPartitionDirectory hash_destroy?
Date
Msg-id fb210e73-0b23-7695-3081-f147c256b0aa@lab.ntt.co.jp
Whole thread Raw
In response to Re: why doesn't DestroyPartitionDirectory hash_destroy?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2019/03/15 1:02, Robert Haas wrote:
> On Thu, Mar 14, 2019 at 3:13 AM Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> I'm curious why DestroyPartitionDirectory doesn't do
>> hash_destroy(pdir->pdir_hash)?
> 
> What would be the point?  It's more efficient to let context teardown
> take care of it.

Yeah, I only noticed that after posting my email.

As I said in another reply, while the executor's partition directory is
set up and torn down under a dedicated memory context used for execution
(es_query_context), planner's is stuck into MessageContext.  But all of
the other stuff that planner allocates goes into it too, so maybe it's fine.

Thanks,
Amit



pgsql-hackers by date:

Previous
From: "Jamison, Kirk"
Date:
Subject: RE: Timeout parameters
Next
From: Amit Langote
Date:
Subject: Re: why doesn't DestroyPartitionDirectory hash_destroy?