83 #define INVALID_SUBPLAN_INDEX -1
84 #define EVENT_BUFFER_SIZE 16
128 appendstate->
ps.
state = estate;
223 appendplanstates[
j++] =
ExecInitNode(initNode, estate, eflags);
401 for (
i = 0;
i < nplans;
i++)
591 Assert(whichplan >= -1 && whichplan <= node->as_nplans);
1063 nevents, WAIT_EVENT_APPEND_READY);
1070 for (
i = 0;
i < noccurred;
i++)
int bms_prev_member(const Bitmapset *a, int prevbit)
int bms_next_member(const Bitmapset *a, int prevbit)
void bms_free(Bitmapset *a)
int bms_num_members(const Bitmapset *a)
bool bms_is_member(int x, const Bitmapset *a)
Bitmapset * bms_add_member(Bitmapset *a, int x)
Bitmapset * bms_intersect(const Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_del_members(Bitmapset *a, const Bitmapset *b)
bool bms_overlap(const Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_add_range(Bitmapset *a, int lower, int upper)
#define Assert(condition)
#define FLEXIBLE_ARRAY_MEMBER
void ExecReScan(PlanState *node)
void ExecAsyncRequest(AsyncRequest *areq)
void ExecAsyncConfigureWait(AsyncRequest *areq)
void ExecAsyncNotify(AsyncRequest *areq)
Bitmapset * ExecFindMatchingSubPlans(PartitionPruneState *prunestate, bool initial_prune)
PartitionPruneState * ExecInitPartitionPruning(PlanState *planstate, int n_total_subplans, PartitionPruneInfo *pruneinfo, Bitmapset **initially_valid_subplans)
void ExecEndNode(PlanState *node)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
const TupleTableSlotOps TTSOpsVirtual
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
static TupleTableSlot * ExecProcNode(PlanState *node)
if(TABLE==NULL||TABLE_index==NULL)
int GetNumRegisteredWaitEvents(WaitEventSet *set)
WaitEventSet * CreateWaitEventSet(ResourceOwner resowner, int nevents)
int AddWaitEventToSet(WaitEventSet *set, uint32 events, pgsocket fd, Latch *latch, void *user_data)
int WaitEventSetWait(WaitEventSet *set, long timeout, WaitEvent *occurred_events, int nevents, uint32 wait_event_info)
void FreeWaitEventSet(WaitEventSet *set)
#define WL_SOCKET_READABLE
#define WL_EXIT_ON_PM_DEATH
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
void LWLockRelease(LWLock *lock)
void LWLockInitialize(LWLock *lock, int tranche_id)
@ LWTRANCHE_PARALLEL_APPEND
void * palloc0(Size size)
#define CHECK_FOR_INTERRUPTS()
void ExecEndAppend(AppendState *node)
static void ExecAppendAsyncBegin(AppendState *node)
static void ExecAppendAsyncEventWait(AppendState *node)
void ExecReScanAppend(AppendState *node)
static void classify_matching_subplans(AppendState *node)
AppendState * ExecInitAppend(Append *node, EState *estate, int eflags)
static void mark_invalid_subplans_as_finished(AppendState *node)
static TupleTableSlot * ExecAppend(PlanState *pstate)
static bool ExecAppendAsyncRequest(AppendState *node, TupleTableSlot **result)
static bool choose_next_subplan_for_leader(AppendState *node)
static bool choose_next_subplan_for_worker(AppendState *node)
void ExecAppendReInitializeDSM(AppendState *node, ParallelContext *pcxt)
#define INVALID_SUBPLAN_INDEX
void ExecAsyncAppendResponse(AsyncRequest *areq)
#define EVENT_BUFFER_SIZE
static bool choose_next_subplan_locally(AppendState *node)
void ExecAppendInitializeWorker(AppendState *node, ParallelWorkerContext *pwcxt)
void ExecAppendInitializeDSM(AppendState *node, ParallelContext *pcxt)
void ExecAppendEstimate(AppendState *node, ParallelContext *pcxt)
static bool ExecAppendAsyncGetNext(AppendState *node, TupleTableSlot **result)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
static int list_length(const List *l)
static void * list_nth(const List *list, int n)
ResourceOwner CurrentResourceOwner
#define ScanDirectionIsForward(direction)
void shm_toc_insert(shm_toc *toc, uint64 key, void *address)
void * shm_toc_allocate(shm_toc *toc, Size nbytes)
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)
struct PartitionPruneState * as_prune_state
Bitmapset * as_valid_asyncplans
Bitmapset * as_needrequest
AsyncRequest ** as_asyncrequests
Bitmapset * as_asyncplans
struct WaitEventSet * as_eventset
bool(* choose_next_subplan)(AppendState *)
int as_first_partial_plan
ParallelAppendState * as_pstate
Bitmapset * as_valid_subplans
TupleTableSlot ** as_asyncresults
bool as_valid_subplans_identified
struct PartitionPruneInfo * part_prune_info
struct PlanState * requestor
struct PlanState * requestee
ScanDirection es_direction
struct EPQState * es_epq_active
bool pa_finished[FLEXIBLE_ARRAY_MEMBER]
shm_toc_estimator estimator
TupleTableSlot * ps_ResultTupleSlot
ProjectionInfo * ps_ProjInfo
ExecProcNodeMtd ExecProcNode
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)