Re: why doesn't DestroyPartitionDirectory hash_destroy?

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: why doesn't DestroyPartitionDirectory hash_destroy?
Date: 2019-03-18 02:01:51
Message-ID: fb210e73-0b23-7695-3081-f147c256b0aa@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)lab(dot)ntt(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-03-18 02:21:57 Re: why doesn't DestroyPartitionDirectory hash_destroy?
Previous Message Michael Paquier 2019-03-18 01:36:16 Re: pg_rewind : feature to rewind promoted standby is broken!