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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <rhaas(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Modify tqueue infrastructure to support transient record types.
Date: 2015-11-09 13:18:56
Message-ID: CAA4eK1+ZQxNnU_RSTtc6edYuV9=aJJWXsFYZ_bs-vsJGDSHm+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
fix_gather_shutdown_workers_v1.patch application/octet-stream 442 bytes

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2015-11-09 15:21:43 pgsql: Translation updates
Previous Message Amit Kapila 2015-11-09 09:06:51 Re: pgsql: Modify tqueue infrastructure to support transient record types.

Browse pgsql-hackers by date

  From Date Subject
Next Message YUriy Zhuravlev 2015-11-09 13:44:45 Re: Some questions about the array.
Previous Message Pavel Stehule 2015-11-09 13:03:27 Re: Some questions about the array.