PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/parallel.h"
#include "executor/execdebug.h"
#include "executor/nodeSort.h"
#include "miscadmin.h"
#include "utils/tuplesort.h"
Go to the source code of this file.
Functions | |
static TupleTableSlot * | ExecSort (PlanState *pstate) |
SortState * | ExecInitSort (Sort *node, EState *estate, int eflags) |
void | ExecEndSort (SortState *node) |
void | ExecSortMarkPos (SortState *node) |
void | ExecSortRestrPos (SortState *node) |
void | ExecReScanSort (SortState *node) |
void | ExecSortEstimate (SortState *node, ParallelContext *pcxt) |
void | ExecSortInitializeDSM (SortState *node, ParallelContext *pcxt) |
void | ExecSortInitializeWorker (SortState *node, ParallelWorkerContext *pwcxt) |
void | ExecSortRetrieveInstrumentation (SortState *node) |
void ExecEndSort | ( | SortState * | node | ) |
Definition at line 301 of file nodeSort.c.
References ExecEndNode(), outerPlanState, SO1_printf, tuplesort_end(), and SortState::tuplesortstate.
Referenced by ExecEndNode().
Definition at line 221 of file nodeSort.c.
References SortState::bounded, SortState::datumSort, EXEC_FLAG_BACKWARD, EXEC_FLAG_MARK, EXEC_FLAG_REWIND, ExecCreateScanSlotFromOuterPlan(), ExecGetResultType(), ExecInitNode(), ExecInitResultTupleSlotTL(), PlanState::ExecProcNode, ExecSort(), makeNode, TupleDescData::natts, outerPlan, outerPlanState, PlanState::plan, ScanState::ps, PlanState::ps_ProjInfo, SortState::randomAccess, SO1_printf, SortState::sort_Done, SortState::ss, PlanState::state, TTSOpsMinimalTuple, TTSOpsVirtual, and SortState::tuplesortstate.
Referenced by ExecInitNode().
void ExecReScanSort | ( | SortState * | node | ) |
Definition at line 362 of file nodeSort.c.
References SortState::bound, SortState::bound_Done, SortState::bounded, SortState::bounded_Done, ExecClearTuple(), ExecReScan(), outerPlan, outerPlanState, ScanState::ps, PlanState::ps_ResultTupleSlot, SortState::randomAccess, SortState::sort_Done, SortState::ss, tuplesort_end(), tuplesort_rescan(), and SortState::tuplesortstate.
Referenced by ExecReScan().
|
static |
Definition at line 50 of file nodeSort.c.
References SortState::am_worker, Assert, SortState::bound, SortState::bound_Done, SortState::bounded, SortState::bounded_Done, castNode, CHECK_FOR_INTERRUPTS, SortState::datumSort, EState::es_direction, ExecClearTuple(), ExecGetResultType(), ExecProcNode(), ExecStoreVirtualTuple(), ForwardScanDirection, if(), IsParallelWorker, Sort::numCols, outerPlanState, ParallelWorkerNumber, PlanState::plan, ScanState::ps, PlanState::ps_ResultTupleSlot, SortState::randomAccess, ScanDirectionIsForward, SortState::shared_info, SharedSortInfo::sinstrument, slot_getsomeattrs(), SO1_printf, SortState::sort_Done, SortState::ss, PlanState::state, TupleTableSlot::tts_isnull, TupleTableSlot::tts_values, TupIsNull, TupleDescAttr, TUPLESORT_ALLOWBOUNDED, tuplesort_begin_datum(), tuplesort_begin_heap(), tuplesort_get_stats(), tuplesort_getdatum(), tuplesort_gettupleslot(), TUPLESORT_NONE, tuplesort_performsort(), tuplesort_putdatum(), tuplesort_puttupleslot(), TUPLESORT_RANDOMACCESS, tuplesort_set_bound(), SortState::tuplesortstate, and work_mem.
Referenced by ExecInitSort().
void ExecSortEstimate | ( | SortState * | node, |
ParallelContext * | pcxt | ||
) |
Definition at line 416 of file nodeSort.c.
References add_size(), ParallelContext::estimator, PlanState::instrument, mul_size(), ParallelContext::nworkers, ScanState::ps, shm_toc_estimate_chunk, shm_toc_estimate_keys, size, and SortState::ss.
Referenced by ExecParallelEstimate().
void ExecSortInitializeDSM | ( | SortState * | node, |
ParallelContext * | pcxt | ||
) |
Definition at line 437 of file nodeSort.c.
References PlanState::instrument, SharedSortInfo::num_workers, ParallelContext::nworkers, PlanState::plan, Plan::plan_node_id, ScanState::ps, SortState::shared_info, shm_toc_allocate(), shm_toc_insert(), size, SortState::ss, and ParallelContext::toc.
Referenced by ExecParallelInitializeDSM().
void ExecSortInitializeWorker | ( | SortState * | node, |
ParallelWorkerContext * | pwcxt | ||
) |
Definition at line 462 of file nodeSort.c.
References SortState::am_worker, PlanState::plan, Plan::plan_node_id, ScanState::ps, SortState::shared_info, shm_toc_lookup(), SortState::ss, and ParallelWorkerContext::toc.
Referenced by ExecParallelInitializeWorker().
void ExecSortMarkPos | ( | SortState * | node | ) |
Definition at line 329 of file nodeSort.c.
References SortState::sort_Done, tuplesort_markpos(), and SortState::tuplesortstate.
Referenced by ExecMarkPos().
void ExecSortRestrPos | ( | SortState * | node | ) |
Definition at line 347 of file nodeSort.c.
References SortState::sort_Done, tuplesort_restorepos(), and SortState::tuplesortstate.
Referenced by ExecRestrPos().
void ExecSortRetrieveInstrumentation | ( | SortState * | node | ) |
Definition at line 476 of file nodeSort.c.
References SharedSortInfo::num_workers, palloc(), SortState::shared_info, and size.
Referenced by ExecParallelRetrieveInstrumentation().