PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/genam.h"
#include "access/spgist_private.h"
#include "access/tableam.h"
#include "access/xloginsert.h"
#include "miscadmin.h"
#include "nodes/execnodes.h"
#include "storage/bufmgr.h"
#include "storage/bulk_write.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 73 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 154 of file spginsert.c.
References buf, INIT_FORKNUM, smgr_bulk_finish(), smgr_bulk_get_buf(), smgr_bulk_start_rel(), smgr_bulk_write(), SPGIST_LEAF, SPGIST_METAPAGE_BLKNO, SPGIST_NULL_BLKNO, SPGIST_NULLS, SPGIST_ROOT_BLKNO, SpGistInitMetapage(), and SpGistInitPage().
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 183 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 41 of file spginsert.c.
References SpGistBuildState::indtuples, MemoryContextReset(), MemoryContextSwitchTo(), spgdoinsert(), SpGistBuildState::spgstate, SpGistBuildState::tmpCtx, and values.
Referenced by spgbuild().