|
PostgreSQL Source Code git master
|
#include "access/amapi.h"#include "access/gin.h"#include "access/ginblock.h"#include "access/htup_details.h"#include "access/itup.h"#include "common/int.h"#include "catalog/pg_am_d.h"#include "fmgr.h"#include "lib/rbtree.h"#include "storage/bufmgr.h"

Go to the source code of this file.
Data Structures | |
| struct | GinOptions |
| struct | GinState |
| struct | GinBtreeStack |
| struct | GinBtreeData |
| struct | GinBtreeEntryInsertData |
| struct | GinBtreeDataLeafInsertData |
| struct | GinScanKeyData |
| struct | GinScanEntryData |
| struct | GinScanOpaqueData |
| struct | GinEntryAccumulator |
| struct | BuildAccumulator |
| struct | GinTupleCollector |
Enumerations | |
| enum | GinPlaceToPageRC { GPTP_NO_WORK , GPTP_INSERT , GPTP_SPLIT } |
Definition at line 34 of file gin_private.h.
| #define GIN_EXCLUSIVE BUFFER_LOCK_EXCLUSIVE |
Definition at line 52 of file gin_private.h.
| #define GIN_SHARE BUFFER_LOCK_SHARE |
Definition at line 51 of file gin_private.h.
| #define GIN_UNLOCK BUFFER_LOCK_UNLOCK |
Definition at line 50 of file gin_private.h.
| #define GinGetPendingListCleanupSize | ( | relation | ) |
Definition at line 40 of file gin_private.h.
| #define GinGetUseFastUpdate | ( | relation | ) |
Definition at line 35 of file gin_private.h.
Definition at line 136 of file gin_private.h.
Definition at line 262 of file gin_private.h.
Definition at line 260 of file gin_private.h.
Definition at line 389 of file gin_private.h.
Definition at line 238 of file gin_private.h.
| Enumerator | |
|---|---|
| GPTP_NO_WORK | |
| GPTP_INSERT | |
| GPTP_SPLIT | |
Definition at line 139 of file gin_private.h.
|
extern |
Definition at line 1775 of file gindatapage.c.
References BufferGetBlockNumber(), BufferGetPage(), data, DEBUG2, elog, END_CRIT_SECTION, fb(), GIN_COMPRESSED, GIN_DATA, GIN_LEAF, ginCompressPostingList(), GinDataLeafPageGetPostingList, GinDataPageMaxDataSize, GinDataPageSetDataSize, GinInitPage(), ginInsertItemPointers(), GinNewBuffer(), GinPageGetOpaque, GinPostingListSegmentMaxSize, InvalidBlockNumber, items, MarkBufferDirty(), GinStatsData::nDataPages, nitems, PageRestoreTempPage(), PageSetLSN(), palloc(), pfree(), PredicateLockPageSplit(), REGBUF_WILL_INIT, RelationNeedsWAL, ginxlogCreatePostingTree::size, SizeOfGinPostingList, START_CRIT_SECTION, UnlockReleaseBuffer(), XLOG_GIN_CREATE_PTREE, XLogBeginInsert(), XLogInsert(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by addItemPointersToLeafTuple(), and buildFreshLeafTuple().
|
extern |
Definition at line 198 of file ginbtree.c.
References GinBtreeStack::buffer, InvalidBuffer, GinBtreeStack::parent, pfree(), and ReleaseBuffer().
Referenced by entryLoadMoreItems(), ginEntryInsert(), ginFinishSplit(), ginInsertValue(), scanPostingTree(), and startScanEntry().
|
extern |
Definition at line 269 of file ginvalidate.c.
References ereport, errcode(), errmsg(), ERROR, fb(), functions, GIN_COMPARE_PARTIAL_PROC, GIN_COMPARE_PROC, GIN_CONSISTENT_PROC, GIN_EXTRACTQUERY_PROC, GIN_EXTRACTVALUE_PROC, GIN_OPTIONS_PROC, GIN_TRICONSISTENT_PROC, lfirst, OpFamilyMember::number, OpFamilyMember::ref_is_family, OpFamilyMember::ref_is_hard, and OpFamilyMember::refobjid.
Referenced by ginhandler().
|
extern |
Definition at line 256 of file ginbulk.c.
References LeftRightWalk, rbt_begin_iterate(), BuildAccumulator::tree, and BuildAccumulator::tree_walk.
Referenced by ginbuild(), ginBuildCallback(), ginFlushBuildState(), and ginInsertCleanup().
|
extern |
Definition at line 26 of file ginscan.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, CurrentMemoryContext, fb(), IndexScanDescData::indexRelation, initGinState(), IndexScanDescData::opaque, palloc_object, and RelationGetIndexScan().
Referenced by ginhandler().
|
extern |
Definition at line 613 of file gininsert.c.
References _gin_begin_parallel(), _gin_end_parallel(), _gin_parallel_merge(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, attnum, CHECK_FOR_INTERRUPTS, CurrentMemoryContext, elog, END_CRIT_SECTION, ERROR, fb(), GIN_LEAF, ginBeginBAScan(), ginBuildCallback(), ginEntryInsert(), ginGetBAEntry(), ginInitBA(), GinInitBuffer(), GinInitMetabuffer(), GinNewBuffer(), ginUpdateStats(), IndexBuildResult::heap_tuples, IndexInfo::ii_Concurrent, IndexInfo::ii_ParallelWorkers, IndexBuildResult::index_tuples, initGinState(), log_newpage_range(), MAIN_FORKNUM, maintenance_work_mem, MarkBufferDirty(), MemoryContextDelete(), MemoryContextSwitchTo(), palloc0_object, palloc_object, pgstat_progress_update_param(), PROGRESS_CREATEIDX_SUBPHASE, PROGRESS_GIN_PHASE_INDEXBUILD_TABLESCAN, RelationGetNumberOfBlocks, RelationGetRelationName, RelationNeedsWAL, START_CRIT_SECTION, table_index_build_scan(), tuplesort_begin_index_gin(), TUPLESORT_NONE, and UnlockReleaseBuffer().
Referenced by ginhandler().
Definition at line 807 of file gininsert.c.
References BMR_REL, EB_LOCK_FIRST, EB_SKIP_EXTENSION_LOCK, END_CRIT_SECTION, ExtendBufferedRel(), fb(), GIN_LEAF, GinInitBuffer(), GinInitMetabuffer(), INIT_FORKNUM, log_newpage_buffer(), MarkBufferDirty(), START_CRIT_SECTION, and UnlockReleaseBuffer().
Referenced by ginhandler().
Definition at line 675 of file ginutil.c.
References fb(), PROGRESS_CREATEIDX_SUBPHASE_INITIALIZE, PROGRESS_GIN_PHASE_INDEXBUILD_TABLESCAN, PROGRESS_GIN_PHASE_MERGE_1, PROGRESS_GIN_PHASE_MERGE_2, PROGRESS_GIN_PHASE_PERFORMSORT_1, and PROGRESS_GIN_PHASE_PERFORMSORT_2.
Referenced by ginhandler().
|
extern |
Definition at line 564 of file ginvacuum.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, AmAutoVacuumWorkerProcess, Assert, DataPageDeleteStack::blkno, BufferGetPage(), callback(), CurrentMemoryContext, END_CRIT_SECTION, fb(), FirstOffsetNumber, GIN_EXCLUSIVE, GIN_ROOT_BLKNO, GIN_SHARE, GIN_UNLOCK, GinGetDownlink, ginInsertCleanup(), GinPageGetOpaque, GinPageIsData, GinPageIsLeaf, ginVacuumEntryPage(), ginVacuumPostingTree(), i, IndexVacuumInfo::index, initGinState(), InvalidBlockNumber, LockBuffer(), MAIN_FORKNUM, MarkBufferDirty(), MemoryContextDelete(), IndexBulkDeleteResult::num_index_tuples, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageRestoreTempPage(), palloc0_object, RBM_NORMAL, ReadBufferExtended(), START_CRIT_SECTION, IndexVacuumInfo::strategy, GinVacuumState::tmpCxt, UnlockReleaseBuffer(), vacuum_delay_point(), and xlogVacuumPage().
Referenced by ginhandler().
|
inlinestatic |
Definition at line 525 of file gin_private.h.
References a, b, fb(), and ginCompareEntries().
Referenced by cmpEntryAccumulator(), entryIsMoveRight(), entryLocateEntry(), entryLocateLeafEntry(), and gin_check_parent_keys_consistency().
|
inlinestatic |
Definition at line 503 of file gin_private.h.
References a, attnum, b, GinState::compareFn, DatumGetInt32(), fb(), FunctionCall2Coll(), GIN_CAT_NORM_KEY, and GinState::supportCollation.
Referenced by collectMatchBitmap(), collectMatchesForHeapRow(), ginCompareAttEntries(), and ginFillScanEntry().
|
inlinestatic |
Definition at line 491 of file gin_private.h.
References a, b, fb(), GinItemPointerGetBlockNumber, GinItemPointerGetOffsetNumber, and pg_cmp_u64().
Referenced by addItemsToLeaf(), dataBeginPlaceToPageLeaf(), dataIsMoveRight(), dataLocateItem(), entryGetItem(), entryLoadMoreItems(), ginCombineData(), GinDataLeafPageGetItems(), ginMergeItemPointers(), ginPostingListDecodeAllSegments(), keyGetItem(), qsortCompareItemPointers(), and scanGetItem().
|
extern |
Definition at line 197 of file ginpostinglist.c.
References Assert, buf, GinPostingList::bytes, encode_varbyte(), fb(), GinPostingList::first, ginPostingListDecode(), itemptr_to_uint64(), MaxBytesPerInteger, GinPostingList::nbytes, palloc(), pfree(), SHORTALIGN, SHORTALIGN_DOWN, SizeOfGinPostingList, and val.
Referenced by _gin_build_tuple(), addItemPointersToLeafTuple(), buildFreshLeafTuple(), createPostingTree(), ginRedoRecompress(), ginVacuumEntryPage(), ginVacuumPostingTreeLeaf(), leafRepackItems(), and test_itemptr_pair().
|
extern |
Definition at line 1349 of file gindatapage.c.
References fb(), GinDataPageAddPostingItem(), GinDataPageGetRightBound, InvalidOffsetNumber, PostingItem::key, PostingItemSetBlockNumber, and root.
Referenced by ginPrepareDataScan().
|
extern |
Definition at line 135 of file gindatapage.c.
References dataLeafPageGetUncompressed(), fb(), ginCompareItemPointers(), GinDataLeafPageGetPostingList, GinDataLeafPageGetPostingListSize, GinNextPostingListSegment, GinPageIsCompressed, ginPostingListDecodeAllSegments(), ItemPointerIsValid(), len, next, nitems, and palloc().
Referenced by entryLoadMoreItems(), gin_check_posting_tree_parent_keys_consistency(), and startScanEntry().
Definition at line 182 of file gindatapage.c.
References dataLeafPageGetUncompressed(), fb(), GinDataLeafPageGetPostingList, GinDataLeafPageGetPostingListSize, GinPageIsCompressed, ginPostingListDecodeAllSegmentsToTbm(), len, nitems, and tbm_add_tuples().
Referenced by scanPostingTree().
|
extern |
Definition at line 380 of file gindatapage.c.
References Assert, data, fb(), GinDataPageGetPostingItem, GinDataPageSetDataSize, GinPageGetOpaque, GinPageIsLeaf, InvalidBlockNumber, InvalidOffsetNumber, and PostingItemGetBlockNumber.
Referenced by dataExecPlaceToPageInternal(), ginDataFillRoot(), and ginRedoInsertData().
|
extern |
Definition at line 504 of file ginscan.c.
References fb(), ginFreeScanKeys(), MemoryContextDelete(), IndexScanDescData::opaque, and pfree().
Referenced by ginhandler().
|
extern |
Definition at line 723 of file ginentrypage.c.
References elog, ERROR, fb(), getRightMostTuple(), GinFormInteriorTuple(), IndexTupleSize(), InvalidOffsetNumber, PageAddItem, pfree(), and root.
Referenced by ginPrepareEntryScan().
|
extern |
Definition at line 346 of file gininsert.c.
References addItemPointersToLeafTuple(), attnum, GinBtreeStack::buffer, BufferGetBlockNumber(), BufferGetPage(), buildFreshLeafTuple(), CheckForSerializableConflictIn(), fb(), GinBtreeData::findItem, freeGinBtreeStack(), GIN_UNLOCK, ginFindLeafPage(), GinGetPostingTree, ginInsertItemPointers(), ginInsertValue(), GinIsPostingTree, ginPrepareEntryScan(), GinState::index, GinBtreeData::isBuild, items, LockBuffer(), GinStatsData::nEntries, GinBtreeStack::off, PageGetItem(), PageGetItemId(), and pfree().
Referenced by _gin_parallel_merge(), ginbuild(), ginBuildCallback(), ginHeapTupleInsert(), and ginInsertCleanup().
|
extern |
Definition at line 451 of file ginutil.c.
References arg, attnum, cmpEntries(), GinState::compareFn, DatumGetPointer(), GinState::extractValueFn, fb(), FunctionCall3Coll(), GIN_CAT_EMPTY_ITEM, GIN_CAT_NORM_KEY, GIN_CAT_NULL_ITEM, GIN_CAT_NULL_KEY, i, j, palloc0(), palloc_array, palloc_object, pfree(), PointerGetDatum(), qsort_arg(), GinState::supportCollation, and value.
Referenced by ginHeapTupleBulkInsert(), ginHeapTupleFastCollect(), and ginHeapTupleInsert().
|
extern |
Definition at line 83 of file ginbtree.c.
References Assert, GinBtreeStack::blkno, GinBtreeStack::buffer, BufferGetPage(), CheckForSerializableConflictIn(), fb(), GinBtreeData::findChildPage, GinBtreeData::fullScan, GIN_UNLOCK, ginFinishOldSplit(), GinPageGetOpaque, GinPageIsIncompleteSplit, GinPageIsLeaf, ginStepRight(), ginTraverseLock(), GinBtreeData::index, InvalidBlockNumber, InvalidOffsetNumber, GinBtreeData::isMoveRight, LockBuffer(), GinBtreeStack::off, palloc_object, GinBtreeStack::parent, GinBtreeStack::predictNumber, ReadBuffer(), ReleaseAndReadBuffer(), and GinBtreeData::rootBlkno.
Referenced by entryLoadMoreItems(), ginEntryInsert(), ginInsertItemPointers(), ginScanBeginPostingTree(), and startScanEntry().
|
extern |
Definition at line 44 of file ginentrypage.c.
References Assert, attnum, data, ereport, errcode(), errmsg(), ERROR, fb(), GIN_CAT_NORM_KEY, GinCategoryOffset, GinGetPosting, GinMaxItemSize, GinSetNPosting, GinSetNullCategory, GinSetPostingOffset, GinState::index, index_form_tuple(), IndexTupleHasNulls(), IndexTupleSize(), Max, MAXALIGN, GinState::oneCol, pfree(), RelationGetRelationName, repalloc(), SHORTALIGN, IndexTupleData::t_info, GinState::tupdesc, and UInt16GetDatum().
Referenced by addItemPointersToLeafTuple(), buildFreshLeafTuple(), ginHeapTupleFastCollect(), and ginVacuumEntryPage().
|
extern |
Definition at line 237 of file ginscan.c.
References GinScanEntryData::buffer, fb(), i, InvalidBuffer, GinScanEntryData::list, GinScanEntryData::matchBitmap, GinScanEntryData::matchIterator, MemoryContextReset(), pfree(), ReleaseBuffer(), tbm_end_private_iterate(), and tbm_free().
Referenced by ginendscan(), gingetbitmap(), and ginrescan().
|
extern |
Definition at line 267 of file ginbulk.c.
References Assert, GinEntryAccumulator::attnum, attnum, GinEntryAccumulator::category, GinEntryAccumulator::count, fb(), GinEntryAccumulator::key, GinEntryAccumulator::list, qsort, qsortCompareItemPointers(), rbt_iterate(), GinEntryAccumulator::shouldSort, and BuildAccumulator::tree_walk.
Referenced by ginbuild(), ginBuildCallback(), ginFlushBuildState(), and ginInsertCleanup().
|
extern |
Definition at line 1931 of file ginget.c.
References fb(), ginFreeScanKeys(), GinIsVoidRes, ginNewScanKey(), ItemPointerGetBlockNumber(), ItemPointerIsLossyPage, ItemPointerSetMin, IndexScanDescData::opaque, scanGetItem(), scanPendingInsert(), startScan(), tbm_add_page(), and tbm_add_tuples().
Referenced by ginhandler().
|
extern |
Definition at line 483 of file ginfast.c.
References attnum, elog, ERROR, fb(), ginExtractEntries(), GinFormTuple(), i, IndexTupleSize(), Max, MaxAllocSize, palloc_array, pg_nextpower2_32(), repalloc_array, IndexTupleData::t_tid, and value.
Referenced by gininsert().
|
extern |
Definition at line 219 of file ginfast.c.
References Assert, BufferGetPage(), CheckForSerializableConflictIn(), data, elog, END_CRIT_SECTION, ERROR, fb(), FirstOffsetNumber, GIN_EXCLUSIVE, GIN_METAPAGE_BLKNO, GIN_PAGE_FREESIZE, GIN_UNLOCK, GinGetPendingListCleanupSize, ginInsertCleanup(), GinListPageSize, GinPageGetMeta, GinPageGetOpaque, GinMetaPageData::head, i, GinState::index, IndexTupleSize(), InvalidBlockNumber, InvalidBuffer, InvalidOffsetNumber, LockBuffer(), makeSublist(), MarkBufferDirty(), GinMetaPageData::nPendingHeapTuples, GinMetaPageData::nPendingPages, OffsetNumberNext, PageAddItem, PageGetExactFreeSpace(), PageGetMaxOffsetNumber(), PageIsEmpty(), PageSetLSN(), palloc(), ReadBuffer(), REGBUF_STANDARD, REGBUF_WILL_INIT, RelationGetRelationName, RelationNeedsWAL, START_CRIT_SECTION, GinMetaPageData::tail, GinMetaPageData::tailFreeSize, UnlockReleaseBuffer(), XLOG_GIN_UPDATE_META_PAGE, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by gininsert().
|
extern |
Definition at line 109 of file ginbulk.c.
References BuildAccumulator::allocatedMemory, cmpEntryAccumulator(), BuildAccumulator::eas_used, BuildAccumulator::entryallocator, fb(), ginAllocEntryAccumulator(), ginCombineData(), rbt_create(), and BuildAccumulator::tree.
Referenced by _gin_parallel_build_main(), ginbuild(), ginBuildCallback(), ginFlushBuildState(), and ginInsertCleanup().
Definition at line 356 of file ginutil.c.
References b, BufferGetPage(), BufferGetPageSize(), and GinInitPage().
Referenced by ginbuild(), ginbuildempty(), ginRedoCreatePTree(), ginRedoDeleteListPages(), ginRedoInsertListPage(), and writeListPage().
|
extern |
Definition at line 227 of file ginlogic.c.
References GinState::consistentFn, directBoolConsistentFn(), directTriConsistentFn(), FmgrInfo::fn_oid, GIN_SEARCH_MODE_EVERYTHING, OidIsValid, shimBoolConsistentFn(), shimTriConsistentFn(), GinState::supportCollation, GinState::triConsistentFn, trueConsistentFn(), and trueTriConsistentFn().
Referenced by ginFillScanKey().
Definition at line 362 of file ginutil.c.
References b, BufferGetPage(), BufferGetPageSize(), GIN_CURRENT_VERSION, GIN_META, GinInitPage(), GinPageGetMeta, GinMetaPageData::ginVersion, GinMetaPageData::head, InvalidBlockNumber, GinMetaPageData::nDataPages, GinMetaPageData::nEntries, GinMetaPageData::nEntryPages, GinMetaPageData::nPendingHeapTuples, GinMetaPageData::nPendingPages, GinMetaPageData::nTotalPages, GinMetaPageData::tail, and GinMetaPageData::tailFreeSize.
Referenced by ginbuild(), ginbuildempty(), ginRedoDeleteListPages(), and ginRedoUpdateMetapage().
Definition at line 344 of file ginutil.c.
References fb(), GinPageOpaqueData::flags, GinPageGetOpaque, InvalidBlockNumber, PageInit(), and GinPageOpaqueData::rightlink.
Referenced by createPostingTree(), dataPlaceToPageLeafSplit(), dataSplitPageInternal(), entrySplitPage(), GinInitBuffer(), GinInitMetabuffer(), and ginPlaceToPage().
|
extern |
Definition at line 856 of file gininsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, CurrentMemoryContext, fb(), GinGetUseFastUpdate, ginHeapTupleFastCollect(), ginHeapTupleFastInsert(), ginHeapTupleInsert(), i, IndexInfo::ii_AmCache, IndexInfo::ii_Context, initGinState(), MemoryContextDelete(), MemoryContextSwitchTo(), TupleDescData::natts, GinState::origTupdesc, palloc_object, and values.
Referenced by ginhandler().
|
extern |
Definition at line 209 of file ginbulk.c.
References Assert, attnum, fb(), FirstOffsetNumber, ginInsertBAEntry(), i, and ItemPointerIsValid().
Referenced by ginHeapTupleBulkInsert(), and processPendingPage().
|
extern |
Definition at line 780 of file ginfast.c.
References BuildAccumulator::allocatedMemory, ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, AmAutoVacuumWorkerProcess, Assert, attnum, autovacuum_work_mem, BufferGetPage(), ConditionalLockPage(), CurrentMemoryContext, ExclusiveLock, fb(), FirstOffsetNumber, GIN_EXCLUSIVE, GIN_METAPAGE_BLKNO, GIN_SHARE, GIN_UNLOCK, ginBeginBAScan(), ginEntryInsert(), ginGetBAEntry(), ginInitBA(), GinPageGetMeta, GinPageGetOpaque, GinPageHasFullRow, GinPageIsDeleted, BuildAccumulator::ginstate, GinMetaPageData::head, GinState::index, IndexFreeSpaceMapVacuum(), initKeyArray(), InvalidBlockNumber, LockBuffer(), LockPage(), maintenance_work_mem, KeyArray::maxvalues, MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), opCtx, PageGetMaxOffsetNumber(), processPendingPage(), ReadBuffer(), ReleaseBuffer(), shiftList(), GinMetaPageData::tail, UnlockPage(), UnlockReleaseBuffer(), vacuum_delay_point(), and work_mem.
Referenced by gin_clean_pending_list(), ginbulkdelete(), ginHeapTupleFastInsert(), and ginvacuumcleanup().
|
extern |
Definition at line 1908 of file gindatapage.c.
References fb(), ginFindLeafPage(), ginInsertValue(), ginPrepareDataScan(), GinBtreeData::isBuild, GinBtreeData::itemptr, and items.
Referenced by addItemPointersToLeafTuple(), createPostingTree(), and ginEntryInsert().
|
extern |
Definition at line 816 of file ginbtree.c.
References GinBtreeStack::buffer, BufferGetPage(), fb(), freeGinBtreeStack(), GIN_EXCLUSIVE, GIN_UNLOCK, ginFinishOldSplit(), ginFinishSplit(), GinPageIsIncompleteSplit, ginPlaceToPage(), InvalidBlockNumber, InvalidBuffer, and LockBuffer().
Referenced by ginEntryInsert(), and ginInsertItemPointers().
|
extern |
Definition at line 378 of file ginpostinglist.c.
References a, b, cmp(), fb(), ginCompareItemPointers(), and palloc().
Referenced by addItemPointersToLeafTuple(), addItemsToLeaf(), GinBufferStoreTuple(), ginRedoRecompress(), and leafRepackItems().
Definition at line 306 of file ginutil.c.
References BMR_REL, BufferGetPage(), ConditionalLockBuffer(), EB_LOCK_FIRST, ExtendBufferedRel(), fb(), GetFreeIndexPage(), GIN_UNLOCK, GinPageIsRecyclable(), InvalidBlockNumber, LockBuffer(), MAIN_FORKNUM, ReadBuffer(), and ReleaseBuffer().
Referenced by createPostingTree(), ginbuild(), ginPlaceToPage(), and makeSublist().
|
extern |
Definition at line 267 of file ginscan.c.
References Assert, DatumGetPointer(), ereport, errcode(), errhint(), errmsg(), ERROR, fb(), FirstOffsetNumber, FunctionCall7Coll(), GIN_CAT_EMPTY_QUERY, GIN_CAT_NULL_KEY, GIN_SEARCH_MODE_ALL, GIN_SEARCH_MODE_DEFAULT, GIN_SEARCH_MODE_EVERYTHING, ginFillScanKey(), ginGetStats(), ginScanKeyAddHiddenEntry(), i, INDEX_MAX_KEYS, IndexScanDescData::indexRelation, IndexScanDescData::instrument, InvalidStrategy, j, IndexScanDescData::keyData, Max, MemoryContextSwitchTo(), IndexScanInstrumentation::nsearches, IndexScanDescData::numberOfKeys, IndexScanDescData::opaque, palloc(), palloc0(), pfree(), pgstat_count_index_scan, PointerGetDatum(), RelationGetRelationName, SK_ISNULL, and UInt16GetDatum().
Referenced by gingetbitmap().
Definition at line 570 of file ginutil.c.
References build_reloptions(), fb(), lengthof, RELOPT_KIND_GIN, RELOPT_TYPE_BOOL, RELOPT_TYPE_INT, and validate().
Referenced by ginhandler().
|
extern |
Definition at line 417 of file gindatapage.c.
References Assert, fb(), FirstOffsetNumber, GinDataPageGetPostingItem, GinDataPageSetDataSize, GinPageGetOpaque, and GinPageIsLeaf.
Referenced by ginDeletePage(), and ginRedoDeletePage().
|
extern |
Definition at line 284 of file ginpostinglist.c.
References fb(), ginPostingListDecodeAllSegments(), and SizeOfGinPostingList.
Referenced by addItemsToLeaf(), dataBeginPlaceToPageLeaf(), gin_leafpage_items(), ginCompressPostingList(), ginReadTuple(), ginReadTupleWithoutState(), ginRedoRecompress(), ginVacuumEntryPage(), ginVacuumPostingTreeLeaf(), leafRepackItems(), and test_itemptr_pair().
|
extern |
Definition at line 297 of file ginpostinglist.c.
References Assert, GinPostingList::bytes, decode_varbyte(), fb(), GinPostingList::first, ginCompareItemPointers(), GinNextPostingListSegment, ItemPointerGetOffsetNumber(), itemptr_to_uint64(), len, GinPostingList::nbytes, OffsetNumberIsValid, palloc(), repalloc(), uint64_to_itemptr(), and val.
Referenced by _gin_parse_tuple_items(), GinDataLeafPageGetItems(), ginPostingListDecode(), and ginPostingListDecodeAllSegmentsToTbm().
|
extern |
Definition at line 358 of file ginpostinglist.c.
References fb(), ginPostingListDecodeAllSegments(), items, len, pfree(), and tbm_add_tuples().
Referenced by GinDataLeafPageGetItemsToTbm().
|
extern |
Definition at line 747 of file ginentrypage.c.
References attnum, GinBtreeData::beginPlaceToPage, GinBtreeData::entryAttnum, entryBeginPlaceToPage(), GinBtreeData::entryCategory, entryExecPlaceToPage(), entryFindChildPtr(), entryGetLeftMostPage(), entryIsMoveRight(), GinBtreeData::entryKey, entryLocateEntry(), entryLocateLeafEntry(), entryPrepareDownlink(), GinBtreeData::execPlaceToPage, fb(), GinBtreeData::fillRoot, GinBtreeData::findChildPage, GinBtreeData::findChildPtr, GinBtreeData::findItem, GinBtreeData::fullScan, GinBtreeData::getLeftMostChild, GIN_ROOT_BLKNO, ginEntryFillRoot(), GinBtreeData::ginstate, GinState::index, GinBtreeData::index, GinBtreeData::isBuild, GinBtreeData::isData, GinBtreeData::isMoveRight, GinBtreeData::prepareDownlink, and GinBtreeData::rootBlkno.
Referenced by ginEntryInsert(), and startScanEntry().
|
extern |
Definition at line 162 of file ginentrypage.c.
References elog, ERROR, fb(), GinGetNPosting, GinGetPosting, GinItupIsCompressed, ginPostingListDecode(), nitems, palloc(), and palloc_array.
Referenced by addItemPointersToLeafTuple(), collectMatchBitmap(), and startScanEntry().
|
extern |
Definition at line 491 of file ginscan.c.
References fb(), ginFreeScanKeys(), IndexScanDescData::keyData, IndexScanDescData::numberOfKeys, and IndexScanDescData::opaque.
Referenced by ginhandler().
|
extern |
Definition at line 1936 of file gindatapage.c.
References GinBtreeData::fullScan, ginFindLeafPage(), and ginPrepareDataScan().
Referenced by scanPostingTree(), and startScanEntry().
Definition at line 177 of file ginbtree.c.
References BufferGetPage(), elog, ERROR, fb(), GinPageGetOpaque, GinPageIsData, GinPageIsLeaf, LockBuffer(), ReadBuffer(), and UnlockReleaseBuffer().
Referenced by entryLoadMoreItems(), ginFindLeafPage(), ginFindParents(), ginFinishSplit(), moveRightIfItNeeded(), and scanPostingTree().
Definition at line 39 of file ginbtree.c.
References BufferGetPage(), GIN_EXCLUSIVE, GIN_SHARE, GIN_UNLOCK, GinPageIsLeaf, and LockBuffer().
Referenced by ginFindLeafPage().
|
extern |
Definition at line 232 of file ginutil.c.
References Assert, DatumGetUInt16(), fb(), FirstOffsetNumber, index_getattr(), GinState::oneCol, and GinState::tupdesc.
Referenced by addItemPointersToLeafTuple(), collectMatchBitmap(), collectMatchesForHeapRow(), entryIsMoveRight(), entryLocateEntry(), entryLocateLeafEntry(), gin_check_parent_keys_consistency(), gintuple_get_key(), ginVacuumEntryPage(), matchPartialInPendingList(), and processPendingPage().
|
extern |
Definition at line 265 of file ginutil.c.
References fb(), FirstOffsetNumber, GIN_CAT_NORM_KEY, GinGetNullCategory, gintuple_get_attrnum(), index_getattr(), OffsetNumberNext, GinState::oneCol, GinState::origTupdesc, and GinState::tupdesc.
Referenced by addItemPointersToLeafTuple(), collectMatchBitmap(), collectMatchesForHeapRow(), entryIsMoveRight(), entryLocateEntry(), entryLocateLeafEntry(), gin_check_parent_keys_consistency(), ginVacuumEntryPage(), matchPartialInPendingList(), and processPendingPage().
|
extern |
Definition at line 687 of file ginvacuum.c.
References AmAutoVacuumWorkerProcess, IndexVacuumInfo::analyze_only, Assert, DataPageDeleteStack::blkno, BufferGetPage(), IndexVacuumInfo::estimated_count, IndexBulkDeleteResult::estimated_count, ExclusiveLock, fb(), GIN_ROOT_BLKNO, GIN_SHARE, ginInsertCleanup(), GinPageIsData, GinPageIsLeaf, GinPageIsList, GinPageIsRecyclable(), ginUpdateStats(), IndexVacuumInfo::index, IndexFreeSpaceMapVacuum(), initGinState(), LockBuffer(), LockRelationForExtension(), MAIN_FORKNUM, Max, IndexVacuumInfo::num_heap_tuples, IndexBulkDeleteResult::num_index_tuples, IndexBulkDeleteResult::num_pages, PageGetMaxOffsetNumber(), IndexBulkDeleteResult::pages_free, palloc0_object, RBM_NORMAL, ReadBufferExtended(), RecordFreeIndexPage(), RELATION_IS_LOCAL, RelationGetNumberOfBlocks, IndexVacuumInfo::strategy, UnlockRelationForExtension(), UnlockReleaseBuffer(), and vacuum_delay_point().
Referenced by ginhandler().
|
extern |
Definition at line 47 of file ginvacuum.c.
References fb(), i, items, palloc_array, and remaining.
Referenced by ginVacuumEntryPage(), and ginVacuumPostingTreeLeaf().
|
extern |
Definition at line 738 of file gindatapage.c.
References BufferGetPage(), computeLeafRecompressWALData(), dlist_iter::cur, dataPlaceToPageLeafRecompress(), disassembleLeaf(), dlist_container, dlist_foreach, elog, END_CRIT_SECTION, ERROR, fb(), GIN_SEGMENT_DELETE, GIN_SEGMENT_REPLACE, GIN_SEGMENT_UNMODIFIED, ginCompressPostingList(), GinDataPageMaxDataSize, ginPostingListDecode(), ginVacuumItemPointers(), MarkBufferDirty(), PageSetLSN(), palloc(), pfree(), REGBUF_STANDARD, RelationNeedsWAL, SizeOfGinPostingList, START_CRIT_SECTION, XLOG_GIN_VACUUM_DATA_LEAF_PAGE, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), and XLogRegisterBuffer().
Referenced by ginVacuumPostingTreeLeaves().
Definition at line 31 of file ginvalidate.c.
References check_amop_signature(), check_amoptsproc_signature(), check_amproc_signature(), elog, ereport, errcode(), errmsg(), ERROR, fb(), format_operator(), format_procedure(), get_opfamily_name(), GETSTRUCT(), GIN_COMPARE_PARTIAL_PROC, GIN_COMPARE_PROC, GIN_CONSISTENT_PROC, GIN_EXTRACTQUERY_PROC, GIN_EXTRACTVALUE_PROC, GIN_OPTIONS_PROC, GIN_TRICONSISTENT_PROC, GINNProcs, HeapTupleIsValid, i, identify_opfamily_groups(), INFO, lfirst, NameStr, ObjectIdGetDatum(), OidIsValid, ReleaseCatCacheList(), ReleaseSysCache(), SearchSysCache1(), and SearchSysCacheList1.
Referenced by ginhandler().
Definition at line 103 of file ginutil.c.
References TypeCacheEntry::cmp_proc_finfo, CreateTemplateTupleDesc(), CurrentMemoryContext, elog, ereport, errcode(), errmsg(), ERROR, fb(), fmgr_info_copy(), FmgrInfo::fn_oid, format_type_be(), GIN_COMPARE_PARTIAL_PROC, GIN_COMPARE_PROC, GIN_CONSISTENT_PROC, GIN_EXTRACTQUERY_PROC, GIN_EXTRACTVALUE_PROC, GIN_TRICONSISTENT_PROC, i, index_getprocid(), index_getprocinfo(), InvalidOid, lookup_type_cache(), MemSet, TupleDescData::natts, OidIsValid, RelationGetDescr, RelationGetRelationName, TupleDescAttr(), TupleDescInitEntry(), TupleDescInitEntryCollation(), and TYPECACHE_CMP_PROC_FINFO.
Referenced by _gin_parallel_build_main(), gin_check_parent_keys_consistency(), gin_clean_pending_list(), ginbeginscan(), ginbuild(), ginbulkdelete(), gininsert(), and ginvacuumcleanup().