PostgreSQL Source Code git master
|
#include "postgres.h"
#include <math.h>
#include "access/relscan.h"
#include "access/tableam.h"
#include "access/visibilitymap.h"
#include "executor/executor.h"
#include "executor/nodeBitmapHeapscan.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "storage/bufmgr.h"
#include "utils/rel.h"
#include "utils/spccache.h"
Go to the source code of this file.
|
inlinestatic |
Definition at line 181 of file nodeBitmapHeapscan.c.
References BM_FINISHED, ConditionVariableBroadcast(), ParallelBitmapHeapState::cv, ParallelBitmapHeapState::mutex, SpinLockAcquire, SpinLockRelease, and ParallelBitmapHeapState::state.
Referenced by BitmapTableScanSetup().
|
static |
Definition at line 126 of file nodeBitmapHeapscan.c.
References BitmapHeapScanState::bitmapqualorig, BitmapTableScanSetup(), CHECK_FOR_INTERRUPTS, ExprContext::ecxt_scantuple, BitmapHeapScanInstrumentation::exact_pages, ExecClearTuple(), ExecQualAndReset(), BitmapHeapScanState::initialized, InstrCountFiltered2, BitmapHeapScanInstrumentation::lossy_pages, ScanState::ps, PlanState::ps_ExprContext, BitmapHeapScanState::recheck, BitmapHeapScanState::ss, ScanState::ss_currentScanDesc, ScanState::ss_ScanTupleSlot, BitmapHeapScanState::stats, and table_scan_bitmap_next_tuple().
Referenced by ExecBitmapHeapScan().
|
static |
Definition at line 193 of file nodeBitmapHeapscan.c.
References BitmapHeapScanState::bitmapqualorig, ExprContext::ecxt_scantuple, ExecQualAndReset(), ScanState::ps, PlanState::ps_ExprContext, and BitmapHeapScanState::ss.
Referenced by ExecBitmapHeapScan().
|
static |
Definition at line 420 of file nodeBitmapHeapscan.c.
References BM_INITIAL, BM_INPROGRESS, ConditionVariableCancelSleep(), ConditionVariableSleep(), ParallelBitmapHeapState::cv, ParallelBitmapHeapState::mutex, SpinLockAcquire, SpinLockRelease, and ParallelBitmapHeapState::state.
Referenced by BitmapTableScanSetup().
|
static |
Definition at line 63 of file nodeBitmapHeapscan.c.
References BitmapDoneInitializingSharedState(), BitmapShouldInitializeSharedState(), elog, ERROR, EState::es_query_dsa, EState::es_snapshot, BitmapHeapScanState::initialized, InvalidDsaPointer, IsA, MultiExecProcNode(), outerPlanState, ScanState::ps, BitmapHeapScanState::pstate, TableScanDescData::rs_tbmiterator, BitmapHeapScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, TableScanDescData::st, PlanState::state, table_beginscan_bm(), BitmapHeapScanState::tbm, tbm_begin_iterate(), tbm_prepare_shared_iterate(), and ParallelBitmapHeapState::tbmiterator.
Referenced by BitmapHeapNext().
void ExecBitmapHeapEstimate | ( | BitmapHeapScanState * | node, |
ParallelContext * | pcxt | ||
) |
Definition at line 453 of file nodeBitmapHeapscan.c.
References add_size(), ParallelContext::estimator, PlanState::instrument, MAXALIGN, mul_size(), ParallelContext::nworkers, ScanState::ps, shm_toc_estimate_chunk, shm_toc_estimate_keys, and BitmapHeapScanState::ss.
Referenced by ExecParallelEstimate().
void ExecBitmapHeapInitializeDSM | ( | BitmapHeapScanState * | node, |
ParallelContext * | pcxt | ||
) |
Definition at line 478 of file nodeBitmapHeapscan.c.
References add_size(), BM_INITIAL, ConditionVariableInit(), ParallelBitmapHeapState::cv, EState::es_query_dsa, PlanState::instrument, MAXALIGN, mul_size(), ParallelBitmapHeapState::mutex, SharedBitmapHeapInstrumentation::num_workers, ParallelContext::nworkers, PlanState::plan, Plan::plan_node_id, ScanState::ps, BitmapHeapScanState::pstate, shm_toc_allocate(), shm_toc_insert(), SharedBitmapHeapInstrumentation::sinstrument, BitmapHeapScanState::sinstrument, SpinLockInit, BitmapHeapScanState::ss, PlanState::state, ParallelBitmapHeapState::state, ParallelBitmapHeapState::tbmiterator, and ParallelContext::toc.
Referenced by ExecParallelInitializeDSM().
void ExecBitmapHeapInitializeWorker | ( | BitmapHeapScanState * | node, |
ParallelWorkerContext * | pwcxt | ||
) |
Definition at line 558 of file nodeBitmapHeapscan.c.
References Assert(), EState::es_query_dsa, PlanState::instrument, MAXALIGN, PlanState::plan, Plan::plan_node_id, ScanState::ps, BitmapHeapScanState::pstate, shm_toc_lookup(), BitmapHeapScanState::sinstrument, BitmapHeapScanState::ss, PlanState::state, and ParallelWorkerContext::toc.
Referenced by ExecParallelInitializeWorker().
void ExecBitmapHeapReInitializeDSM | ( | BitmapHeapScanState * | node, |
ParallelContext * | pcxt | ||
) |
Definition at line 533 of file nodeBitmapHeapscan.c.
References BM_INITIAL, DsaPointerIsValid, EState::es_query_dsa, InvalidDsaPointer, ScanState::ps, BitmapHeapScanState::pstate, BitmapHeapScanState::ss, PlanState::state, ParallelBitmapHeapState::state, tbm_free_shared_area(), and ParallelBitmapHeapState::tbmiterator.
Referenced by ExecParallelReInitializeDSM().
void ExecBitmapHeapRetrieveInstrumentation | ( | BitmapHeapScanState * | node | ) |
Definition at line 581 of file nodeBitmapHeapscan.c.
References SharedBitmapHeapInstrumentation::num_workers, palloc(), and BitmapHeapScanState::sinstrument.
Referenced by ExecParallelRetrieveInstrumentation().
|
static |
Definition at line 212 of file nodeBitmapHeapscan.c.
References BitmapHeapNext(), BitmapHeapRecheck(), castNode, ExecScan(), and BitmapHeapScanState::ss.
Referenced by ExecInitBitmapHeapScan().
void ExecEndBitmapHeapScan | ( | BitmapHeapScanState * | node | ) |
Definition at line 267 of file nodeBitmapHeapscan.c.
References Assert(), BitmapHeapScanInstrumentation::exact_pages, ExecEndNode(), IsParallelWorker, BitmapHeapScanInstrumentation::lossy_pages, outerPlanState, ParallelWorkerNumber, TableScanDescData::rs_tbmiterator, SharedBitmapHeapInstrumentation::sinstrument, BitmapHeapScanState::sinstrument, BitmapHeapScanState::ss, ScanState::ss_currentScanDesc, TableScanDescData::st, BitmapHeapScanState::stats, table_endscan(), BitmapHeapScanState::tbm, tbm_end_iterate(), tbm_exhausted(), and tbm_free().
Referenced by ExecEndNode().
BitmapHeapScanState * ExecInitBitmapHeapScan | ( | BitmapHeapScan * | node, |
EState * | estate, | ||
int | eflags | ||
) |
Definition at line 333 of file nodeBitmapHeapscan.c.
References Assert(), BitmapHeapScanState::bitmapqualorig, BitmapHeapScan::bitmapqualorig, EState::es_snapshot, EXEC_FLAG_BACKWARD, EXEC_FLAG_MARK, ExecAssignExprContext(), ExecAssignScanProjectionInfo(), ExecBitmapHeapScan(), ExecInitNode(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), ExecOpenScanRelation(), PlanState::ExecProcNode, BitmapHeapScanState::initialized, IsMVCCSnapshot, makeNode, outerPlan, outerPlanState, PlanState::plan, ScanState::ps, BitmapHeapScanState::pstate, PlanState::qual, BitmapHeapScanState::recheck, RelationGetDescr, BitmapHeapScan::scan, Scan::scanrelid, BitmapHeapScanState::ss, ScanState::ss_currentRelation, PlanState::state, BitmapHeapScanState::stats, table_slot_callbacks(), and BitmapHeapScanState::tbm.
Referenced by ExecInitNode().
void ExecReScanBitmapHeapScan | ( | BitmapHeapScanState * | node | ) |
Definition at line 226 of file nodeBitmapHeapscan.c.
References ExecReScan(), ExecScanReScan(), BitmapHeapScanState::initialized, outerPlan, outerPlanState, BitmapHeapScanState::recheck, TableScanDescData::rs_tbmiterator, BitmapHeapScanState::ss, ScanState::ss_currentScanDesc, TableScanDescData::st, table_rescan(), BitmapHeapScanState::tbm, tbm_end_iterate(), tbm_exhausted(), and tbm_free().
Referenced by ExecReScan().