PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/gin_private.h"
#include "access/tableam.h"
#include "access/xloginsert.h"
#include "miscadmin.h"
#include "nodes/execnodes.h"
#include "storage/bufmgr.h"
#include "storage/predicate.h"
#include "utils/memutils.h"
#include "utils/rel.h"
Go to the source code of this file.
Data Structures | |
struct | GinBuildState |
|
static |
Definition at line 46 of file gininsert.c.
References Assert, attnum, createPostingTree(), ginCompressPostingList(), GinFormTuple(), ginInsertItemPointers(), GinIsPostingTree, GinMaxItemSize, ginMergeItemPointers(), ginReadTuple(), GinSetPostingTree, gintuple_get_attrnum(), gintuple_get_key(), GinState::index, items, sort-test::key, pfree(), res, and SizeOfGinPostingList.
Referenced by ginEntryInsert().
|
static |
Definition at line 126 of file gininsert.c.
References attnum, createPostingTree(), ginCompressPostingList(), GinFormTuple(), GinMaxItemSize, GinSetPostingTree, GinState::index, items, sort-test::key, pfree(), res, and SizeOfGinPostingList.
Referenced by ginEntryInsert().
IndexBuildResult* ginbuild | ( | Relation | heap, |
Relation | index, | ||
IndexInfo * | indexInfo | ||
) |
Definition at line 317 of file gininsert.c.
References GinBuildState::accum, ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, attnum, GinBuildState::buildStats, CHECK_FOR_INTERRUPTS, CurrentMemoryContext, elog, END_CRIT_SECTION, ERROR, GinBuildState::funcCtx, GIN_LEAF, ginBeginBAScan(), ginBuildCallback(), ginEntryInsert(), ginGetBAEntry(), ginInitBA(), GinInitBuffer(), GinInitMetabuffer(), GinNewBuffer(), GinBuildState::ginstate, BuildAccumulator::ginstate, ginUpdateStats(), IndexBuildResult::heap_tuples, IndexBuildResult::index_tuples, GinBuildState::indtuples, initGinState(), sort-test::key, sort-test::list, log_newpage_range(), MAIN_FORKNUM, MarkBufferDirty(), MemoryContextDelete(), MemoryContextSwitchTo(), GinStatsData::nEntryPages, GinStatsData::nTotalPages, palloc(), RelationGetNumberOfBlocks, RelationGetRelationName, RelationNeedsWAL, START_CRIT_SECTION, table_index_build_scan(), GinBuildState::tmpCtx, and UnlockReleaseBuffer().
Referenced by ginhandler().
|
static |
Definition at line 277 of file gininsert.c.
References GinBuildState::accum, BuildAccumulator::allocatedMemory, attnum, GinBuildState::buildStats, CHECK_FOR_INTERRUPTS, ginBeginBAScan(), ginEntryInsert(), ginGetBAEntry(), ginHeapTupleBulkInsert(), ginInitBA(), GinBuildState::ginstate, i, sort-test::key, sort-test::list, maintenance_work_mem, MemoryContextReset(), MemoryContextSwitchTo(), TupleDescData::natts, GinState::origTupdesc, GinBuildState::tmpCtx, and values.
Referenced by ginbuild().
void ginbuildempty | ( | Relation | index | ) |
Definition at line 434 of file gininsert.c.
References BMR_REL, EB_LOCK_FIRST, EB_SKIP_EXTENSION_LOCK, END_CRIT_SECTION, ExtendBufferedRel(), GIN_LEAF, GinInitBuffer(), GinInitMetabuffer(), INIT_FORKNUM, log_newpage_buffer(), MarkBufferDirty(), START_CRIT_SECTION, and UnlockReleaseBuffer().
Referenced by ginhandler().
void ginEntryInsert | ( | GinState * | ginstate, |
OffsetNumber | attnum, | ||
Datum | key, | ||
GinNullCategory | category, | ||
ItemPointerData * | items, | ||
uint32 | nitem, | ||
GinStatsData * | buildStats | ||
) |
Definition at line 176 of file gininsert.c.
References addItemPointersToLeafTuple(), attnum, GinBtreeStack::buffer, BufferGetBlockNumber(), BufferGetPage(), buildFreshLeafTuple(), CheckForSerializableConflictIn(), GinBtreeEntryInsertData::entry, GinBtreeData::findItem, freeGinBtreeStack(), GIN_UNLOCK, ginFindLeafPage(), GinGetPostingTree, ginInsertItemPointers(), ginInsertValue(), GinIsPostingTree, ginPrepareEntryScan(), GinState::index, GinBtreeData::isBuild, GinBtreeEntryInsertData::isDelete, items, sort-test::key, LockBuffer(), GinStatsData::nEntries, GinBtreeStack::off, PageGetItem(), PageGetItemId(), and pfree().
Referenced by ginbuild(), ginBuildCallback(), ginHeapTupleInsert(), and ginInsertCleanup().
|
static |
Definition at line 253 of file gininsert.c.
References GinBuildState::accum, attnum, GinBuildState::funcCtx, ginExtractEntries(), ginInsertBAEntries(), BuildAccumulator::ginstate, GinBuildState::indtuples, MemoryContextReset(), MemoryContextSwitchTo(), and value.
Referenced by ginBuildCallback().
|
static |
Definition at line 465 of file gininsert.c.
References attnum, ginEntryInsert(), ginExtractEntries(), i, and value.
Referenced by gininsert().
bool gininsert | ( | Relation | index, |
Datum * | values, | ||
bool * | isnull, | ||
ItemPointer | ht_ctid, | ||
Relation | heapRel, | ||
IndexUniqueCheck | checkUnique, | ||
bool | indexUnchanged, | ||
IndexInfo * | indexInfo | ||
) |
Definition at line 483 of file gininsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, GinGetUseFastUpdate, ginHeapTupleFastCollect(), ginHeapTupleFastInsert(), ginHeapTupleInsert(), i, if(), IndexInfo::ii_AmCache, IndexInfo::ii_Context, initGinState(), MemoryContextDelete(), MemoryContextSwitchTo(), TupleDescData::natts, GinState::origTupdesc, palloc(), and values.
Referenced by ginhandler().