Re: pgsql: Modify tqueue infrastructure to support transient record types. - Mailing list pgsql-committers

From Robert Haas
Subject Re: pgsql: Modify tqueue infrastructure to support transient record types.
Date
Msg-id CA+TgmoYw3F+OpwSBtgBcpOS=AHNzk5rs7M8ro4pGkxAmcECAqA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Modify tqueue infrastructure to support transient record types.  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-committers
On Mon, Nov 9, 2015 at 8:18 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Sat, Nov 7, 2015 at 3:29 AM, Robert Haas <rhaas@postgresql.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


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Fix rebasing mistake in nodeGather.c
Next
From: Robert Haas
Date:
Subject: pgsql: Comment update.