83 #define INVALID_SUBPLAN_INDEX -1 84 #define EVENT_BUFFER_SIZE 16 128 appendstate->
ps.
state = estate;
232 appendplanstates[j++] =
ExecInitNode(initNode, estate, eflags);
402 for (i = 0; i < nplans; i++)
589 Assert(whichplan >= -1 && whichplan <= node->as_nplans);
1035 for (i = 0; i < noccurred; i++)
void ExecAsyncRequest(AsyncRequest *areq)
static void classify_matching_subplans(AppendState *node)
#define IsA(nodeptr, _type_)
void ExecAppendInitializeWorker(AppendState *node, ParallelWorkerContext *pwcxt)
static TupleTableSlot * ExecAppend(PlanState *pstate)
Bitmapset * bms_copy(const Bitmapset *a)
void FreeWaitEventSet(WaitEventSet *set)
ProjectionInfo * ps_ProjInfo
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
#define ScanDirectionIsForward(direction)
int AddWaitEventToSet(WaitEventSet *set, uint32 events, pgsocket fd, Latch *latch, void *user_data)
struct PartitionPruneState * as_prune_state
Bitmapset * as_asyncplans
#define castNode(_type_, nodeptr)
void ExecEndNode(PlanState *node)
Bitmapset * as_valid_asyncplans
struct PlanState * requestor
void ExecAppendReInitializeDSM(AppendState *node, ParallelContext *pcxt)
static void ExecAppendAsyncEventWait(AppendState *node)
shm_toc_estimator estimator
static bool choose_next_subplan_locally(AppendState *node)
void ExecReScan(PlanState *node)
int bms_next_member(const Bitmapset *a, int prevbit)
const TupleTableSlotOps TTSOpsVirtual
#define EVENT_BUFFER_SIZE
#define FLEXIBLE_ARRAY_MEMBER
AppendState * ExecInitAppend(Append *node, EState *estate, int eflags)
#define WL_SOCKET_READABLE
#define shm_toc_estimate_chunk(e, sz)
void ExecAsyncConfigureWait(AsyncRequest *areq)
ScanDirection es_direction
struct EPQState * es_epq_active
void LWLockRelease(LWLock *lock)
WaitEventSet * CreateWaitEventSet(MemoryContext context, int nevents)
TupleTableSlot * ps_ResultTupleSlot
static bool ExecAppendAsyncGetNext(AppendState *node, TupleTableSlot **result)
struct WaitEventSet * as_eventset
Bitmapset * bms_add_range(Bitmapset *a, int lower, int upper)
struct PlanState * requestee
ParallelAppendState * as_pstate
static void * list_nth(const List *list, int n)
void ExecEndAppend(AppendState *node)
void ExecAsyncNotify(AsyncRequest *areq)
bool(* choose_next_subplan)(AppendState *)
int bms_num_members(const Bitmapset *a)
Bitmapset * ExecFindInitialMatchingSubPlans(PartitionPruneState *prunestate, int nsubplans)
int as_first_partial_plan
MemoryContext CurrentMemoryContext
static bool choose_next_subplan_for_worker(AppendState *node)
#define INVALID_SUBPLAN_INDEX
void LWLockInitialize(LWLock *lock, int tranche_id)
bool bms_is_empty(const Bitmapset *a)
static bool ExecAppendAsyncRequest(AppendState *node, TupleTableSlot **result)
void * palloc0(Size size)
ExecProcNodeMtd ExecProcNode
Bitmapset * as_valid_subplans
void ExecReScanAppend(AppendState *node)
Size add_size(Size s1, Size s2)
static TupleTableSlot * ExecProcNode(PlanState *node)
bool pa_finished[FLEXIBLE_ARRAY_MEMBER]
int bms_prev_member(const Bitmapset *a, int prevbit)
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
void ExecAsyncAppendResponse(AsyncRequest *areq)
void ExecAppendInitializeDSM(AppendState *node, ParallelContext *pcxt)
static void mark_invalid_subplans_as_finished(AppendState *node)
void ExecAppendEstimate(AppendState *node, ParallelContext *pcxt)
void bms_free(Bitmapset *a)
struct PartitionPruneInfo * part_prune_info
#define Assert(condition)
static bool choose_next_subplan_for_leader(AppendState *node)
static void ExecAppendAsyncBegin(AppendState *node)
void ExecAssignExprContext(EState *estate, PlanState *planstate)
#define shm_toc_estimate_keys(e, cnt)
static int list_length(const List *l)
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
void ExecInitResultTupleSlotTL(PlanState *planstate, const TupleTableSlotOps *tts_ops)
void * shm_toc_allocate(shm_toc *toc, Size nbytes)
Bitmapset * bms_add_member(Bitmapset *a, int x)
Bitmapset * bms_del_members(Bitmapset *a, const Bitmapset *b)
bool bms_overlap(const Bitmapset *a, const Bitmapset *b)
AsyncRequest ** as_asyncrequests
void shm_toc_insert(shm_toc *toc, uint64 key, void *address)
Bitmapset * as_needrequest
#define CHECK_FOR_INTERRUPTS()
PartitionPruneState * ExecCreatePartitionPruneState(PlanState *planstate, PartitionPruneInfo *partitionpruneinfo)
Bitmapset * bms_int_members(Bitmapset *a, const Bitmapset *b)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
bool bms_is_member(int x, const Bitmapset *a)
void * shm_toc_lookup(shm_toc *toc, uint64 key, bool noError)
#define offsetof(type, field)
#define WL_EXIT_ON_PM_DEATH
int WaitEventSetWait(WaitEventSet *set, long timeout, WaitEvent *occurred_events, int nevents, uint32 wait_event_info)
Bitmapset * ExecFindMatchingSubPlans(PartitionPruneState *prunestate)
TupleTableSlot ** as_asyncresults