PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/genam.h"
#include "access/spgist_private.h"
#include "access/spgxlog.h"
#include "access/tableam.h"
#include "access/xlog.h"
#include "access/xloginsert.h"
#include "catalog/index.h"
#include "miscadmin.h"
#include "storage/bufmgr.h"
#include "storage/smgr.h"
#include "utils/memutils.h"
#include "utils/rel.h"
Go to the source code of this file.
Data Structures | |
struct | SpGistBuildState |
Functions | |
static void | spgistBuildCallback (Relation index, ItemPointer tid, Datum *values, bool *isnull, bool tupleIsAlive, void *state) |
IndexBuildResult * | spgbuild (Relation heap, Relation index, IndexInfo *indexInfo) |
void | spgbuildempty (Relation index) |
bool | spginsert (Relation index, Datum *values, bool *isnull, ItemPointer ht_ctid, Relation heapRel, IndexUniqueCheck checkUnique, bool indexUnchanged, IndexInfo *indexInfo) |
IndexBuildResult* spgbuild | ( | Relation | heap, |
Relation | index, | ||
IndexInfo * | indexInfo | ||
) |
Definition at line 75 of file spginsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert(), BufferGetBlockNumber(), BufferGetPage(), CurrentMemoryContext, elog(), END_CRIT_SECTION, ERROR, IndexBuildResult::heap_tuples, IndexBuildResult::index_tuples, SpGistBuildState::indtuples, initSpGistState(), SpGistState::isBuild, log_newpage_range(), MAIN_FORKNUM, MarkBufferDirty(), MemoryContextDelete(), palloc0(), RelationGetNumberOfBlocks, RelationGetRelationName, RelationNeedsWAL, SPGIST_LEAF, SPGIST_METAPAGE_BLKNO, SPGIST_NULL_BLKNO, SPGIST_NULLS, SPGIST_ROOT_BLKNO, spgistBuildCallback(), SpGistInitBuffer(), SpGistInitMetapage(), SpGistNewBuffer(), SpGistUpdateMetaPage(), SpGistBuildState::spgstate, START_CRIT_SECTION, table_index_build_scan(), SpGistBuildState::tmpCtx, and UnlockReleaseBuffer().
Referenced by spghandler().
void spgbuildempty | ( | Relation | index | ) |
Definition at line 156 of file spginsert.c.
References Assert(), BUFFER_LOCK_EXCLUSIVE, BufferGetBlockNumber(), BufferGetPage(), END_CRIT_SECTION, INIT_FORKNUM, LockBuffer(), log_newpage_buffer(), MarkBufferDirty(), P_NEW, RBM_NORMAL, ReadBufferExtended(), SPGIST_LEAF, SPGIST_METAPAGE_BLKNO, SPGIST_NULL_BLKNO, SPGIST_NULLS, SPGIST_ROOT_BLKNO, SpGistInitBuffer(), SpGistInitMetapage(), START_CRIT_SECTION, and UnlockReleaseBuffer().
Referenced by spghandler().
bool spginsert | ( | Relation | index, |
Datum * | values, | ||
bool * | isnull, | ||
ItemPointer | ht_ctid, | ||
Relation | heapRel, | ||
IndexUniqueCheck | checkUnique, | ||
bool | indexUnchanged, | ||
IndexInfo * | indexInfo | ||
) |
Definition at line 200 of file spginsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, initSpGistState(), MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), spgdoinsert(), SpGistUpdateMetaPage(), and values.
Referenced by spghandler().
|
static |
Definition at line 43 of file spginsert.c.
References SpGistBuildState::indtuples, MemoryContextReset(), MemoryContextSwitchTo(), spgdoinsert(), SpGistBuildState::spgstate, SpGistBuildState::tmpCtx, and values.
Referenced by spgbuild().