On Sat, Nov 7, 2015 at 3:29 AM, Robert Haas <[email protected]> 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: fix_gather_shutdown_workers_v1.patch
Description: Binary data

-- 
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to