95 "calling tuplesort_begin");
107 plannode->sortOperators[0],
108 plannode->collations[0],
109 plannode->nullsFirst[0],
116 plannode->sortColIdx,
117 plannode->sortOperators,
118 plannode->collations,
119 plannode->nullsFirst,
178 Assert(ParallelWorkerNumber <= node->shared_info->num_workers);
186 "retrieving tuple from tuplesort");
227 "initializing sort node");
285 if (outerTupDesc->
natts == 1)
291 "sort node initialized");
304 "shutting down sort node");
319 "sort node shutdown");
#define Assert(condition)
void ExecReScan(PlanState *node)
void ExecEndNode(PlanState *node)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
const TupleTableSlotOps TTSOpsVirtual
TupleTableSlot * ExecStoreVirtualTuple(TupleTableSlot *slot)
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
const TupleTableSlotOps TTSOpsMinimalTuple
TupleDesc ExecGetResultType(PlanState *planstate)
void ExecCreateScanSlotFromOuterPlan(EState *estate, ScanState *scanstate, const TupleTableSlotOps *tts_ops)
#define outerPlanState(node)
#define EXEC_FLAG_BACKWARD
static TupleTableSlot * ExecProcNode(PlanState *node)
#define IsParallelWorker()
if(TABLE==NULL||TABLE_index==NULL)
#define CHECK_FOR_INTERRUPTS()
SortState * ExecInitSort(Sort *node, EState *estate, int eflags)
void ExecSortMarkPos(SortState *node)
static TupleTableSlot * ExecSort(PlanState *pstate)
void ExecSortInitializeWorker(SortState *node, ParallelWorkerContext *pwcxt)
void ExecReScanSort(SortState *node)
void ExecSortRestrPos(SortState *node)
void ExecSortEstimate(SortState *node, ParallelContext *pcxt)
void ExecSortInitializeDSM(SortState *node, ParallelContext *pcxt)
void ExecSortRetrieveInstrumentation(SortState *node)
void ExecEndSort(SortState *node)
#define castNode(_type_, nodeptr)
#define ScanDirectionIsForward(direction)
void * shm_toc_allocate(shm_toc *toc, Size nbytes)
void shm_toc_insert(shm_toc *toc, uint64 key, void *address)
void * shm_toc_lookup(shm_toc *toc, uint64 key, bool noError)
#define shm_toc_estimate_chunk(e, sz)
#define shm_toc_estimate_keys(e, cnt)
Size add_size(Size s1, Size s2)
Size mul_size(Size s1, Size s2)
static pg_noinline void Size size
ScanDirection es_direction
shm_toc_estimator estimator
Instrumentation * instrument
TupleTableSlot * ps_ResultTupleSlot
ProjectionInfo * ps_ProjInfo
ExecProcNodeMtd ExecProcNode
TuplesortInstrumentation sinstrument[FLEXIBLE_ARRAY_MEMBER]
SharedSortInfo * shared_info
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
void tuplesort_rescan(Tuplesortstate *state)
void tuplesort_performsort(Tuplesortstate *state)
void tuplesort_get_stats(Tuplesortstate *state, TuplesortInstrumentation *stats)
void tuplesort_end(Tuplesortstate *state)
void tuplesort_markpos(Tuplesortstate *state)
void tuplesort_restorepos(Tuplesortstate *state)
void tuplesort_set_bound(Tuplesortstate *state, int64 bound)
#define TUPLESORT_RANDOMACCESS
#define TUPLESORT_ALLOWBOUNDED
struct TuplesortInstrumentation TuplesortInstrumentation
void tuplesort_putdatum(Tuplesortstate *state, Datum val, bool isNull)
void tuplesort_puttupleslot(Tuplesortstate *state, TupleTableSlot *slot)
Tuplesortstate * tuplesort_begin_heap(TupleDesc tupDesc, int nkeys, AttrNumber *attNums, Oid *sortOperators, Oid *sortCollations, bool *nullsFirstFlags, int workMem, SortCoordinate coordinate, int sortopt)
bool tuplesort_gettupleslot(Tuplesortstate *state, bool forward, bool copy, TupleTableSlot *slot, Datum *abbrev)
Tuplesortstate * tuplesort_begin_datum(Oid datumType, Oid sortOperator, Oid sortCollation, bool nullsFirstFlag, int workMem, SortCoordinate coordinate, int sortopt)
bool tuplesort_getdatum(Tuplesortstate *state, bool forward, bool copy, Datum *val, bool *isNull, Datum *abbrev)
static void slot_getsomeattrs(TupleTableSlot *slot, int attnum)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)