Re: [HACKERS] [POC] Faster processing at Gather node

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] [POC] Faster processing at Gather node
Date: 2017-12-01 14:34:45
Message-ID: CA+TgmoYB63v_070kvQyKRPWM=nWfPsAf82r6k0i+r2Tf1mO5zQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 26, 2017 at 3:15 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> Yeah and I think something like that can happen after your patch
> because now the memory for tuples returned via TupleQueueReaderNext
> will be allocated in ExecutorState and that can last for long. I
> think it is better to free memory, but we can leave it as well if you
> don't feel it important. In any case, I have written a patch, see if
> you think it makes sense.

Well, I don't really know. My intuition is that in most cases after
ExecShutdownGatherMergeWorkers() we will very shortly thereafter call
ExecutorEnd() and everything will go away. Maybe that's wrong, but
Tom put that call where it is in
2d44c58c79aeef2d376be0141057afbb9ec6b5bc, and he could have put it
inside ExecShutdownGatherMergeWorkers() instead. Now maybe he didn't
consider that approach, but Tom is usually smart about stuff like
that...

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-12-01 14:39:03 Re: [HACKERS] Proposal: Local indexes for partitioned table
Previous Message Alexey Kondratov 2017-12-01 14:33:04 Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling