|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/relscan.h"#include "access/tableam.h"#include "access/visibilitymap.h"#include "executor/executor.h"#include "executor/instrument.h"#include "executor/nodeBitmapHeapscan.h"#include "miscadmin.h"#include "pgstat.h"#include "storage/bufmgr.h"#include "storage/condition_variable.h"#include "utils/dsa.h"#include "utils/rel.h"#include "utils/spccache.h"#include "utils/wait_event.h"
Go to the source code of this file.
Data Structures | |
| struct | ParallelBitmapHeapState |
Typedefs | |
| typedef struct ParallelBitmapHeapState | ParallelBitmapHeapState |
Enumerations | |
| enum | SharedBitmapState { BM_INITIAL , BM_INPROGRESS , BM_FINISHED } |
| Enumerator | |
|---|---|
| BM_INITIAL | |
| BM_INPROGRESS | |
| BM_FINISHED | |
Definition at line 72 of file nodeBitmapHeapscan.c.
|
inlinestatic |
Definition at line 229 of file nodeBitmapHeapscan.c.
References BM_FINISHED, ConditionVariableBroadcast(), ParallelBitmapHeapState::cv, ParallelBitmapHeapState::mutex, SpinLockAcquire(), SpinLockRelease(), and ParallelBitmapHeapState::state.
Referenced by BitmapTableScanSetup().
|
static |
Definition at line 174 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 241 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 477 of file nodeBitmapHeapscan.c.
References BM_INITIAL, BM_INPROGRESS, ConditionVariableCancelSleep(), ConditionVariableSleep(), ParallelBitmapHeapState::cv, fb(), ParallelBitmapHeapState::mutex, SpinLockAcquire(), SpinLockRelease(), and ParallelBitmapHeapState::state.
Referenced by BitmapTableScanSetup().
|
static |
Definition at line 102 of file nodeBitmapHeapscan.c.
References BitmapDoneInitializingSharedState(), BitmapShouldInitializeSharedState(), elog, ERROR, EState::es_instrument, EState::es_query_dsa, EState::es_snapshot, fb(), BitmapHeapScanState::initialized, INSTRUMENT_IO, InvalidDsaPointer, IsA, MultiExecProcNode(), outerPlanState, ScanState::ps, BitmapHeapScanState::pstate, TableScanDescData::rs_tbmiterator, ScanRelIsReadOnly(), SO_HINT_REL_READ_ONLY, SO_NONE, SO_SCAN_INSTRUMENT, 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 510 of file nodeBitmapHeapscan.c.
References ParallelContext::estimator, MAXALIGN, shm_toc_estimate_chunk, and shm_toc_estimate_keys.
Referenced by ExecParallelEstimate().
| void ExecBitmapHeapInitializeDSM | ( | BitmapHeapScanState * | node, |
| ParallelContext * | pcxt | ||
| ) |
Definition at line 525 of file nodeBitmapHeapscan.c.
References BM_INITIAL, ConditionVariableInit(), ParallelBitmapHeapState::cv, EState::es_query_dsa, fb(), MAXALIGN, ParallelBitmapHeapState::mutex, PlanState::plan, Plan::plan_node_id, ScanState::ps, BitmapHeapScanState::pstate, shm_toc_allocate(), shm_toc_insert(), SpinLockInit(), BitmapHeapScanState::ss, ParallelBitmapHeapState::state, PlanState::state, ParallelBitmapHeapState::tbmiterator, and ParallelContext::toc.
Referenced by ExecParallelInitializeDSM().
| void ExecBitmapHeapInitializeWorker | ( | BitmapHeapScanState * | node, |
| ParallelWorkerContext * | pwcxt | ||
| ) |
Definition at line 583 of file nodeBitmapHeapscan.c.
References Assert, EState::es_query_dsa, fb(), PlanState::plan, Plan::plan_node_id, ScanState::ps, BitmapHeapScanState::pstate, shm_toc_lookup(), BitmapHeapScanState::ss, and PlanState::state.
Referenced by ExecParallelInitializeWorker().
| void ExecBitmapHeapInstrumentEstimate | ( | BitmapHeapScanState * | node, |
| ParallelContext * | pcxt | ||
| ) |
Definition at line 597 of file nodeBitmapHeapscan.c.
References add_size(), ParallelContext::estimator, fb(), PlanState::instrument, mul_size(), ParallelContext::nworkers, ScanState::ps, shm_toc_estimate_chunk, shm_toc_estimate_keys, and BitmapHeapScanState::ss.
Referenced by ExecParallelEstimate().
| void ExecBitmapHeapInstrumentInitDSM | ( | BitmapHeapScanState * | node, |
| ParallelContext * | pcxt | ||
| ) |
Definition at line 615 of file nodeBitmapHeapscan.c.
References add_size(), fb(), PlanState::instrument, mul_size(), SharedBitmapHeapInstrumentation::num_workers, ParallelContext::nworkers, PARALLEL_KEY_SCAN_INSTRUMENT_OFFSET, PlanState::plan, Plan::plan_node_id, ScanState::ps, shm_toc_allocate(), shm_toc_insert(), BitmapHeapScanState::sinstrument, BitmapHeapScanState::ss, and ParallelContext::toc.
Referenced by ExecParallelInitializeDSM().
| void ExecBitmapHeapInstrumentInitWorker | ( | BitmapHeapScanState * | node, |
| ParallelWorkerContext * | pwcxt | ||
| ) |
Definition at line 641 of file nodeBitmapHeapscan.c.
References fb(), PlanState::instrument, PARALLEL_KEY_SCAN_INSTRUMENT_OFFSET, PlanState::plan, Plan::plan_node_id, ScanState::ps, shm_toc_lookup(), BitmapHeapScanState::sinstrument, and BitmapHeapScanState::ss.
Referenced by ExecParallelInitializeWorker().
| void ExecBitmapHeapReInitializeDSM | ( | BitmapHeapScanState * | node, |
| ParallelContext * | pcxt | ||
| ) |
Definition at line 558 of file nodeBitmapHeapscan.c.
References BM_INITIAL, DsaPointerIsValid, EState::es_query_dsa, fb(), InvalidDsaPointer, ScanState::ps, BitmapHeapScanState::pstate, BitmapHeapScanState::ss, ParallelBitmapHeapState::state, PlanState::state, tbm_free_shared_area(), and ParallelBitmapHeapState::tbmiterator.
Referenced by ExecParallelReInitializeDSM().
| void ExecBitmapHeapRetrieveInstrumentation | ( | BitmapHeapScanState * | node | ) |
Definition at line 661 of file nodeBitmapHeapscan.c.
References fb(), memcpy(), SharedBitmapHeapInstrumentation::num_workers, palloc(), and BitmapHeapScanState::sinstrument.
Referenced by ExecParallelRetrieveInstrumentation().
|
static |
Definition at line 260 of file nodeBitmapHeapscan.c.
References BitmapHeapNext(), BitmapHeapRecheck(), castNode, ExecScan(), and BitmapHeapScanState::ss.
Referenced by ExecInitBitmapHeapScan().
| void ExecEndBitmapHeapScan | ( | BitmapHeapScanState * | node | ) |
Definition at line 315 of file nodeBitmapHeapscan.c.
References AccumulateIOStats(), Assert, BitmapHeapScanInstrumentation::exact_pages, ExecEndNode(), fb(), TableScanInstrumentation::io, IsParallelWorker, BitmapHeapScanInstrumentation::lossy_pages, outerPlanState, ParallelWorkerNumber, TableScanDescData::rs_instrument, SharedBitmapHeapInstrumentation::sinstrument, BitmapHeapScanState::sinstrument, BitmapHeapScanState::ss, ScanState::ss_currentScanDesc, 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 389 of file nodeBitmapHeapscan.c.
References Assert, BitmapHeapScan::bitmapqualorig, EState::es_snapshot, EXEC_FLAG_BACKWARD, EXEC_FLAG_MARK, ExecAssignExprContext(), ExecAssignScanProjectionInfo(), ExecBitmapHeapScan(), ExecInitNode(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), ExecOpenScanRelation(), fb(), IsMVCCSnapshot, makeNode, outerPlan, outerPlanState, RelationGetDescr, BitmapHeapScan::scan, Scan::scanrelid, table_slot_callbacks(), and TTS_FLAG_OBEYS_NOT_NULL_CONSTRAINTS.
Referenced by ExecInitNode().
| void ExecReScanBitmapHeapScan | ( | BitmapHeapScanState * | node | ) |
Definition at line 274 of file nodeBitmapHeapscan.c.
References ExecReScan(), ExecScanReScan(), fb(), 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().