Skip to content

Commit 6b65a7f

Browse files
committed
Remove TupleDesc remapping logic from tqueue.c.
With the introduction of a shared memory record typmod registry, it is no longer necessary to remap record typmods when sending tuples between backends so most of tqueue.c can be removed. Author: Thomas Munro Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CAEepm=0ZtQ-SpsgCyzzYpsXS6e=kZWqk3g5Ygn3MDV7A8dabUA@mail.gmail.com
1 parent cc5f813 commit 6b65a7f

File tree

6 files changed

+27
-1110
lines changed

6 files changed

+27
-1110
lines changed

src/backend/executor/execParallel.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,14 +608,12 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate, int nworkers,
608608

609609
/*
610610
* Set up tuple queue readers to read the results of a parallel subplan.
611-
* All the workers are expected to return tuples matching tupDesc.
612611
*
613612
* This is separate from ExecInitParallelPlan() because we can launch the
614613
* worker processes and let them start doing something before we do this.
615614
*/
616615
void
617-
ExecParallelCreateReaders(ParallelExecutorInfo *pei,
618-
TupleDesc tupDesc)
616+
ExecParallelCreateReaders(ParallelExecutorInfo *pei)
619617
{
620618
int nworkers = pei->pcxt->nworkers_launched;
621619
int i;
@@ -631,8 +629,7 @@ ExecParallelCreateReaders(ParallelExecutorInfo *pei,
631629
{
632630
shm_mq_set_handle(pei->tqueue[i],
633631
pei->pcxt->worker[i].bgwhandle);
634-
pei->reader[i] = CreateTupleQueueReader(pei->tqueue[i],
635-
tupDesc);
632+
pei->reader[i] = CreateTupleQueueReader(pei->tqueue[i]);
636633
}
637634
}
638635
}

src/backend/executor/nodeGather.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ ExecGather(PlanState *pstate)
176176
/* Set up tuple queue readers to read the results. */
177177
if (pcxt->nworkers_launched > 0)
178178
{
179-
ExecParallelCreateReaders(node->pei,
180-
fslot->tts_tupleDescriptor);
179+
ExecParallelCreateReaders(node->pei);
181180
/* Make a working array showing the active readers */
182181
node->nreaders = pcxt->nworkers_launched;
183182
node->reader = (TupleQueueReader **)

src/backend/executor/nodeGatherMerge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ ExecGatherMerge(PlanState *pstate)
217217
/* Set up tuple queue readers to read the results. */
218218
if (pcxt->nworkers_launched > 0)
219219
{
220-
ExecParallelCreateReaders(node->pei, node->tupDesc);
220+
ExecParallelCreateReaders(node->pei);
221221
/* Make a working array showing the active readers */
222222
node->nreaders = pcxt->nworkers_launched;
223223
node->reader = (TupleQueueReader **)

0 commit comments

Comments
 (0)