1996-07-09 02:22:35 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
1999-02-13 18:22:53 -05:00
|
|
|
* nodeAppend.h
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
2019-01-02 12:44:25 -05:00
|
|
|
* Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
|
2000-01-26 00:58:53 -05:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
2010-09-20 16:08:53 -04:00
|
|
|
* src/include/executor/nodeAppend.h
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
#ifndef NODEAPPEND_H
|
|
|
|
|
#define NODEAPPEND_H
|
|
|
|
|
|
Support Parallel Append plan nodes.
When we create an Append node, we can spread out the workers over the
subplans instead of piling on to each subplan one at a time, which
should typically be a bit more efficient, both because the startup
cost of any plan executed entirely by one worker is paid only once and
also because of reduced contention. We can also construct Append
plans using a mix of partial and non-partial subplans, which may allow
for parallelism in places that otherwise couldn't support it.
Unfortunately, this patch doesn't handle the important case of
parallelizing UNION ALL by running each branch in a separate worker;
the executor infrastructure is added here, but more planner work is
needed.
Amit Khandekar, Robert Haas, Amul Sul, reviewed and tested by
Ashutosh Bapat, Amit Langote, Rafia Sabih, Amit Kapila, and
Rajkumar Raghuwanshi.
Discussion: http://postgr.es/m/CAJ3gD9dy0K_E8r727heqXoBmWZ83HwLFwdcaSSmBQ1+S+vRuUQ@mail.gmail.com
2017-12-05 17:28:39 -05:00
|
|
|
#include "access/parallel.h"
|
2002-12-05 10:50:39 -05:00
|
|
|
#include "nodes/execnodes.h"
|
1997-11-25 20:14:33 -05:00
|
|
|
|
2006-02-27 23:10:28 -05:00
|
|
|
extern AppendState *ExecInitAppend(Append *node, EState *estate, int eflags);
|
2002-12-05 10:50:39 -05:00
|
|
|
extern void ExecEndAppend(AppendState *node);
|
2010-07-12 13:01:06 -04:00
|
|
|
extern void ExecReScanAppend(AppendState *node);
|
Support Parallel Append plan nodes.
When we create an Append node, we can spread out the workers over the
subplans instead of piling on to each subplan one at a time, which
should typically be a bit more efficient, both because the startup
cost of any plan executed entirely by one worker is paid only once and
also because of reduced contention. We can also construct Append
plans using a mix of partial and non-partial subplans, which may allow
for parallelism in places that otherwise couldn't support it.
Unfortunately, this patch doesn't handle the important case of
parallelizing UNION ALL by running each branch in a separate worker;
the executor infrastructure is added here, but more planner work is
needed.
Amit Khandekar, Robert Haas, Amul Sul, reviewed and tested by
Ashutosh Bapat, Amit Langote, Rafia Sabih, Amit Kapila, and
Rajkumar Raghuwanshi.
Discussion: http://postgr.es/m/CAJ3gD9dy0K_E8r727heqXoBmWZ83HwLFwdcaSSmBQ1+S+vRuUQ@mail.gmail.com
2017-12-05 17:28:39 -05:00
|
|
|
extern void ExecAppendEstimate(AppendState *node, ParallelContext *pcxt);
|
|
|
|
|
extern void ExecAppendInitializeDSM(AppendState *node, ParallelContext *pcxt);
|
|
|
|
|
extern void ExecAppendReInitializeDSM(AppendState *node, ParallelContext *pcxt);
|
|
|
|
|
extern void ExecAppendInitializeWorker(AppendState *node, ParallelWorkerContext *pwcxt);
|
2001-10-28 01:26:15 -05:00
|
|
|
|
1996-07-09 02:22:35 -04:00
|
|
|
#endif /* NODEAPPEND_H */
|