PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/genam.h"
#include "access/generic_xlog.h"
#include "access/tableam.h"
#include "bloom.h"
#include "catalog/index.h"
#include "miscadmin.h"
#include "storage/bufmgr.h"
#include "storage/indexfsm.h"
#include "storage/smgr.h"
#include "utils/memutils.h"
#include "utils/rel.h"
Go to the source code of this file.
Data Structures | |
struct | BloomBuildState |
Functions | |
static void | flushCachedPage (Relation index, BloomBuildState *buildstate) |
static void | initCachedPage (BloomBuildState *buildstate) |
static void | bloomBuildCallback (Relation index, ItemPointer tid, Datum *values, bool *isnull, bool tupleIsAlive, void *state) |
IndexBuildResult * | blbuild (Relation heap, Relation index, IndexInfo *indexInfo) |
void | blbuildempty (Relation index) |
bool | blinsert (Relation index, Datum *values, bool *isnull, ItemPointer ht_ctid, Relation heapRel, IndexUniqueCheck checkUnique, bool indexUnchanged, IndexInfo *indexInfo) |
Variables | |
PG_MODULE_MAGIC | |
IndexBuildResult* blbuild | ( | Relation | heap, |
Relation | index, | ||
IndexInfo * | indexInfo | ||
) |
Definition at line 121 of file blinsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, bloomBuildCallback(), BloomInitMetapage(), BloomBuildState::blstate, BloomBuildState::count, CurrentMemoryContext, elog, ERROR, flushCachedPage(), IndexBuildResult::heap_tuples, IndexBuildResult::index_tuples, BloomBuildState::indtuples, initBloomState(), initCachedPage(), MAIN_FORKNUM, MemoryContextDelete(), palloc(), RelationGetNumberOfBlocks, RelationGetRelationName, table_index_build_scan(), and BloomBuildState::tmpCtx.
Referenced by blhandler().
void blbuildempty | ( | Relation | index | ) |
Definition at line 164 of file blinsert.c.
References BloomInitMetapage(), and INIT_FORKNUM.
Referenced by blhandler().
bool blinsert | ( | Relation | index, |
Datum * | values, | ||
bool * | isnull, | ||
ItemPointer | ht_ctid, | ||
Relation | heapRel, | ||
IndexUniqueCheck | checkUnique, | ||
bool | indexUnchanged, | ||
IndexInfo * | indexInfo | ||
) |
Definition at line 174 of file blinsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, BLOOM_METAPAGE_BLKNO, BloomFormTuple(), BloomInitPage(), BloomNewBuffer(), BloomPageAddItem(), BloomPageGetMeta, BloomPageIsDeleted, BUFFER_LOCK_EXCLUSIVE, BUFFER_LOCK_SHARE, BUFFER_LOCK_UNLOCK, BufferGetBlockNumber(), BufferGetPage(), CurrentMemoryContext, elog, ERROR, GENERIC_XLOG_FULL_IMAGE, GenericXLogAbort(), GenericXLogFinish(), GenericXLogRegisterBuffer(), GenericXLogStart(), initBloomState(), InvalidBlockNumber, LockBuffer(), MemoryContextDelete(), MemoryContextSwitchTo(), BloomMetaPageData::nEnd, BloomMetaPageData::notFullPage, BloomMetaPageData::nStart, PageIsNew(), ReadBuffer(), ReleaseBuffer(), UnlockReleaseBuffer(), and values.
Referenced by blhandler().
|
static |
Definition at line 74 of file blinsert.c.
References BloomFormTuple(), BloomPageAddItem(), BloomBuildState::blstate, CHECK_FOR_INTERRUPTS, BloomBuildState::count, BloomBuildState::data, PGAlignedBlock::data, elog, ERROR, flushCachedPage(), BloomBuildState::indtuples, initCachedPage(), MemoryContextReset(), MemoryContextSwitchTo(), BloomBuildState::tmpCtx, and values.
Referenced by blbuild().
|
static |
Definition at line 47 of file blinsert.c.
References BloomNewBuffer(), BloomBuildState::data, PGAlignedBlock::data, GENERIC_XLOG_FULL_IMAGE, GenericXLogFinish(), GenericXLogRegisterBuffer(), GenericXLogStart(), and UnlockReleaseBuffer().
Referenced by blbuild(), and bloomBuildCallback().
|
static |
Definition at line 64 of file blinsert.c.
References BloomInitPage(), BloomBuildState::count, BloomBuildState::data, and PGAlignedBlock::data.
Referenced by blbuild(), and bloomBuildCallback().
PG_MODULE_MAGIC |
Definition at line 27 of file blinsert.c.