Re: pgsql: Modify tqueue infrastructure to support transient record types.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Modify tqueue infrastructure to support transient record types.
Date: 2015-11-09 15:54:04
Message-ID: CA+TgmoYw3F+OpwSBtgBcpOS=AHNzk5rs7M8ro4pGkxAmcECAqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Nov 9, 2015 at 8:18 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Sat, Nov 7, 2015 at 3:29 AM, Robert Haas <rhaas(at)postgresql(dot)org> wrote:
>>
>> Modify tqueue infrastructure to support transient record types.
>>
>
> +static HeapTuple
> +gather_readnext(GatherState *gatherstate)
> +{
> ..
> + if (readerdone)
> + {
> + DestroyTupleQueueReader(reader);
> + --gatherstate->nreaders;
> + if (gatherstate->nreaders == 0)
> + {
> + ExecShutdownGather(gatherstate);
> + return NULL;
> + }
> ..
> }
>
> I think after readers are done, it's not good to call ShutdownGather,
> because it will destroy the parallel context as well and the same is
> needed for the cases when after the readers are done we still need
> to access dsm, like for rescan and for scanning the data from local
> node.
>
> Here, we should just shutdown the workers and that is what we were
> doing previous to this commit. Attached patch fixes this problem.

Oops. Rebasing fail. Committed.

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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-11-09 18:53:25 pgsql: Comment update.
Previous Message Robert Haas 2015-11-09 15:54:03 pgsql: Fix rebasing mistake in nodeGather.c

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-11-09 15:56:57 Re: Getting sorted data from foreign server for merge join
Previous Message Catalin Iacob 2015-11-09 15:46:00 Re: proposal: PL/Pythonu - function ereport