|
PostgreSQL Source Code git master
|
#include "access/amapi.h"#include "access/gist.h"#include "access/itup.h"#include "lib/pairingheap.h"#include "storage/bufmgr.h"#include "storage/buffile.h"#include "utils/hsearch.h"#include "access/genam.h"

Go to the source code of this file.
Data Structures | |
| struct | GISTNodeBufferPage |
| struct | GISTSTATE |
| struct | GISTSearchHeapItem |
| struct | GISTSearchItem |
| struct | GISTScanOpaqueData |
| struct | gistxlogPage |
| struct | SplitPageLayout |
| struct | GISTInsertStack |
| struct | GistSplitVector |
| struct | GISTInsertState |
| struct | GISTNodeBuffer |
| struct | GISTBuildBuffers |
| struct | GiSTOptions |
| struct | GISTPageSplitInfo |
Enumerations | |
| enum | GistOptBufferingMode { GIST_OPTION_BUFFERING_AUTO , GIST_OPTION_BUFFERING_ON , GIST_OPTION_BUFFERING_OFF } |
| #define BUFFER_HALF_FILLED | ( | nodeBuffer, | |
| gfbb | |||
| ) | ((nodeBuffer)->blocksCount > (gfbb)->pagesPerBuffer / 2) |
Definition at line 324 of file gist_private.h.
| #define BUFFER_OVERFLOWED | ( | nodeBuffer, | |
| gfbb | |||
| ) | ((nodeBuffer)->blocksCount > (gfbb)->pagesPerBuffer) |
Definition at line 332 of file gist_private.h.
| #define BUFFER_PAGE_DATA_OFFSET MAXALIGN(offsetof(GISTNodeBufferPage, tupledata)) |
Definition at line 53 of file gist_private.h.
| #define GIST_DEFAULT_FILLFACTOR 90 |
Definition at line 480 of file gist_private.h.
| #define GIST_EXCLUSIVE BUFFER_LOCK_EXCLUSIVE |
Definition at line 43 of file gist_private.h.
| #define GIST_MAX_SPLIT_PAGES 75 |
Definition at line 39 of file gist_private.h.
| #define GIST_MIN_FILLFACTOR 10 |
Definition at line 479 of file gist_private.h.
| #define GIST_ROOT_BLKNO 0 |
Definition at line 262 of file gist_private.h.
| #define GIST_SHARE BUFFER_LOCK_SHARE |
Definition at line 42 of file gist_private.h.
| #define GIST_UNLOCK BUFFER_LOCK_UNLOCK |
Definition at line 44 of file gist_private.h.
| #define GiSTPageSize ( BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(GISTPageOpaqueData)) ) |
Definition at line 476 of file gist_private.h.
| #define GISTSearchItemIsHeap | ( | item | ) | ((item).blkno == InvalidBlockNumber) |
Definition at line 145 of file gist_private.h.
| #define GistTupleIsInvalid | ( | itup | ) | ( ItemPointerGetOffsetNumber( &((itup)->t_tid) ) == TUPLE_IS_INVALID ) |
Definition at line 288 of file gist_private.h.
| #define GistTupleSetValid | ( | itup | ) | ItemPointerSetOffsetNumber( &((itup)->t_tid), TUPLE_IS_VALID ) |
Definition at line 289 of file gist_private.h.
Definition at line 319 of file gist_private.h.
Definition at line 55 of file gist_private.h.
| #define PAGE_IS_EMPTY | ( | nbp | ) | (nbp->freespace == BLCKSZ - BUFFER_PAGE_DATA_OFFSET) |
Definition at line 57 of file gist_private.h.
Definition at line 59 of file gist_private.h.
| #define SizeOfGISTSearchItem | ( | n_distances | ) |
Definition at line 147 of file gist_private.h.
| #define TUPLE_IS_INVALID 0xfffe |
Definition at line 286 of file gist_private.h.
| #define TUPLE_IS_VALID 0xffff |
Definition at line 285 of file gist_private.h.
Definition at line 181 of file gist_private.h.
| Enumerator | |
|---|---|
| GIST_OPTION_BUFFERING_AUTO | |
| GIST_OPTION_BUFFERING_ON | |
| GIST_OPTION_BUFFERING_OFF | |
Definition at line 384 of file gist_private.h.
|
extern |
Definition at line 129 of file gist.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, and CurrentMemoryContext.
Referenced by gist_xlog_startup(), gistbeginscan(), gistbuild(), and gistinsert().
Definition at line 1664 of file gist.c.
References MemoryContextDelete(), and GISTSTATE::scanCxt.
Referenced by gistbuild(), and gistendscan().
|
extern |
Definition at line 288 of file gistvalidate.c.
References ereport, errcode(), errmsg(), ERROR, fb(), functions, GIST_COMPRESS_PROC, GIST_CONSISTENT_PROC, GIST_DECOMPRESS_PROC, GIST_DISTANCE_PROC, GIST_EQUAL_PROC, GIST_FETCH_PROC, GIST_OPTIONS_PROC, GIST_PENALTY_PROC, GIST_PICKSPLIT_PROC, GIST_SORTSUPPORT_PROC, GIST_TRANSLATE_CMPTYPE_PROC, GIST_UNION_PROC, lfirst, OpFamilyMember::number, OpFamilyMember::ref_is_family, OpFamilyMember::ref_is_hard, and OpFamilyMember::refobjid.
Referenced by gisthandler().
|
extern |
Definition at line 179 of file gistbuild.c.
References Assert, BufferGetBlockNumber(), BufferGetPage(), createTempGistContext(), CurrentMemoryContext, DEBUG1, elog, END_CRIT_SECTION, ERROR, F_LEAF, fb(), fillfactor, freeGISTstate(), GIST_BUFFERING_ACTIVE, GIST_BUFFERING_AUTO, GIST_BUFFERING_DISABLED, GIST_BUFFERING_STATS, GIST_DEFAULT_FILLFACTOR, gist_indexsortbuild(), GIST_OPTION_BUFFERING_OFF, GIST_OPTION_BUFFERING_ON, GIST_ROOT_BLKNO, GIST_SORTED_BUILD, GIST_SORTSUPPORT_PROC, gistBuildCallback(), GistBuildLSN, gistEmptyAllBuffers(), gistFreeBuildBuffers(), GISTInitBuffer(), gistNewBuffer(), gistSortedBuildCallback(), IndexBuildResult::heap_tuples, i, index_getprocid(), INDEX_MAX_KEYS, IndexBuildResult::index_tuples, IndexRelationGetNumberOfKeyAttributes, initGISTstate(), log_newpage_range(), MAIN_FORKNUM, maintenance_work_mem, MarkBufferDirty(), MemoryContextDelete(), MemoryContextSwitchTo(), OidIsValid, PageSetLSN(), palloc_object, RelationGetNumberOfBlocks, RelationGetRelationName, RelationNeedsWAL, START_CRIT_SECTION, table_index_build_scan(), tuplesort_begin_index_gist(), tuplesort_end(), TUPLESORT_NONE, tuplesort_performsort(), and UnlockReleaseBuffer().
Referenced by gisthandler().
Definition at line 140 of file gist.c.
References BMR_REL, EB_LOCK_FIRST, EB_SKIP_EXTENSION_LOCK, END_CRIT_SECTION, ExtendBufferedRel(), F_LEAF, fb(), GISTInitBuffer(), INIT_FORKNUM, log_newpage_buffer(), MarkBufferDirty(), START_CRIT_SECTION, and UnlockReleaseBuffer().
Referenced by gisthandler().
|
extern |
Definition at line 59 of file gistvacuum.c.
References callback(), fb(), gistvacuumscan(), and palloc0_object.
Referenced by gisthandler().
Definition at line 798 of file gistget.c.
References GIST_COMPRESS_PROC, GIST_FETCH_PROC, index_getprocid(), IndexRelationGetNumberOfKeyAttributes, and OidIsValid.
Referenced by gisthandler().
Definition at line 785 of file gistutil.c.
References buf, BufferGetBlockNumber(), BufferGetPage(), ereport, errcode(), errhint(), errmsg(), ERROR, fb(), MAXALIGN, PageGetSpecialSize(), PageIsNew(), and RelationGetRelationName.
Referenced by gistBufferingFindCorrectParent(), gistdoinsert(), gistFindCorrectParent(), gistFindPath(), gistkillitems(), gistNewBuffer(), gistScanPage(), and gistvacuum_delete_empty_pages().
|
extern |
Definition at line 374 of file gistutil.c.
References Assert, fb(), FirstOffsetNumber, gistDeCompressAtt(), gistdentryinit(), GistPageIsLeaf, gistpenalty(), i, index_getattr(), INDEX_MAX_KEYS, IndexRelationGetNumberOfKeyAttributes, j, GISTSTATE::leafTupdesc, OffsetNumberNext, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), pg_global_prng_state, and pg_prng_bool().
Referenced by gistdoinsert(), and gistProcessItup().
|
extern |
Definition at line 596 of file gistutil.c.
References GISTSTATE::compressFn, DatumGetPointer(), fb(), FmgrInfo::fn_oid, FunctionCall1Coll(), gistentryinit, i, IndexRelationGetNumberOfKeyAttributes, TupleDescData::natts, OidIsValid, PointerGetDatum(), RelationData::rd_att, and GISTSTATE::supportCollation.
Referenced by gistFormTuple(), and gistSortedBuildCallback().
|
extern |
Definition at line 296 of file gistutil.c.
References fb(), gistdentryinit(), i, index_getattr(), IndexRelationGetNumberOfKeyAttributes, and GISTSTATE::leafTupdesc.
Referenced by gistchoose(), gistgetadjusted(), gistRelocateBuildBuffersOnSplit(), and placeOne().
|
extern |
Definition at line 547 of file gistutil.c.
References DatumGetPointer(), GISTSTATE::decompressFn, fb(), FmgrInfo::fn_oid, FunctionCall1Coll(), gistentryinit, OidIsValid, PointerGetDatum(), and GISTSTATE::supportCollation.
Referenced by gistchoose(), gistDeCompressAtt(), gistindex_keytest(), gistMakeUnionItVec(), and gistSplitByKey().
|
extern |
Definition at line 639 of file gist.c.
References Assert, GISTInsertStack::blkno, GISTInsertStack::buffer, BufferGetLSNAtomic(), BufferGetPage(), GISTInsertStack::downlinkoffnum, ereport, errdetail(), errhint(), errmsg(), ERROR, fb(), GIST_EXCLUSIVE, GIST_ROOT_BLKNO, GIST_SHARE, GIST_UNLOCK, gistcheckpage(), gistchoose(), gistfixsplit(), GistFollowRight, gistgetadjusted(), gistinserttuple(), GistPageGetNSN, GistPageIsDeleted, GistPageIsLeaf, GistTupleIsInvalid, InvalidOffsetNumber, InvalidXLogRecPtr, ItemPointerGetBlockNumber(), LockBuffer(), GISTInsertStack::lsn, GISTInsertStack::page, PageGetItem(), PageGetItemId(), PageGetLSN(), palloc0_object, GISTInsertStack::parent, ReadBuffer(), RelationGetRelationName, RelationNeedsWAL, ReleaseBuffer(), GISTInsertStack::retry_from_parent, UnlockReleaseBuffer(), and XLogRecPtrIsValid.
Referenced by gistBuildCallback(), and gistinsert().
|
extern |
Definition at line 95 of file gistutil.c.
References fb(), FirstOffsetNumber, i, len, OffsetNumberNext, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), and palloc_array.
Referenced by gist_indexsortbuild_levelstate_flush(), and gistplacetopage().
|
extern |
Definition at line 667 of file gistutil.c.
References GISTSTATE::compressFn, fb(), fetchatt, GISTSTATE::fetchFn, GISTSTATE::fetchTupdesc, FmgrInfo::fn_oid, gistFetchAtt(), heap_form_tuple(), i, index_getattr(), INDEX_MAX_KEYS, IndexRelationGetNumberOfKeyAttributes, InvalidOid, GISTSTATE::leafTupdesc, MemoryContextSwitchTo(), TupleDescData::natts, RelationData::rd_att, and GISTSTATE::tempCxt.
Referenced by gistScanPage().
|
extern |
Definition at line 34 of file gistutil.c.
References elog, ERROR, fb(), FirstOffsetNumber, i, IndexTupleSize(), InvalidOffsetNumber, len, OffsetNumberNext, PageAddItem, PageGetMaxOffsetNumber(), and PageIsEmpty().
Referenced by gist_indexsortbuild_levelstate_add(), gistplacetopage(), and gistRedoPageSplitRecord().
|
extern |
Definition at line 127 of file gistutil.c.
References fb(), i, IndexTupleSize(), and palloc().
Referenced by gist_indexsortbuild_levelstate_flush(), gistplacetopage(), and gistSplit().
|
extern |
Definition at line 79 of file gistutil.c.
References fb(), GiSTPageSize, i, IndexTupleSize(), and len.
Referenced by gistSplit().
|
extern |
Definition at line 575 of file gistutil.c.
References fb(), gistCompressValues(), index_form_tuple(), INDEX_MAX_KEYS, ItemPointerSetOffsetNumber(), GISTSTATE::leafTupdesc, GISTSTATE::nonLeafTupdesc, and IndexTupleData::t_tid.
Referenced by gistBuildCallback(), gistgetadjusted(), gistinsert(), gistSplit(), and gistunion().
|
extern |
Definition at line 505 of file gistbuildbuffers.c.
References BufFileClose(), and GISTBuildBuffers::pfile.
Referenced by gistbuild().
|
extern |
Definition at line 316 of file gistutil.c.
References fb(), gistDeCompressAtt(), gistFormTuple(), gistKeyIsEQ(), gistMakeUnionKey(), i, INDEX_MAX_KEYS, and IndexRelationGetNumberOfKeyAttributes.
Referenced by gistdoinsert(), gistformdownlink(), gistProcessItup(), and gistRelocateBuildBuffersOnSplit().
|
extern |
Definition at line 746 of file gistget.c.
References CHECK_FOR_INTERRUPTS, GISTSearchItem::distances, fb(), getNextGISTSearchItem(), GIST_ROOT_BLKNO, gistScanPage(), IndexScanDescData::indexRelation, IndexScanDescData::instrument, MemoryContextReset(), IndexScanInstrumentation::nsearches, IndexScanDescData::opaque, pfree(), pgstat_count_index_scan, and IndexScanDescData::xs_hitup.
Referenced by gisthandler().
|
extern |
Definition at line 1016 of file gistutil.c.
References Assert, fb(), FirstNormalUnloggedLSN, GetFakeLSNForUnloggedRel(), GetXLogInsertRecPtr(), gistXLogAssignLSN(), InvalidXLogRecPtr, RelationData::rd_rel, RelationIsPermanent, RelationNeedsWAL, and XLogRecPtrIsValid.
Referenced by gistdeletepage(), gistplacetopage(), gistprunepage(), gistvacuumpage(), and gistvacuumscan().
|
extern |
Definition at line 111 of file gistbuildbuffers.c.
References GISTNodeBuffer::blocksCount, GISTBuildBuffers::buffersOnLevels, GISTBuildBuffers::buffersOnLevelsLen, GISTBuildBuffers::context, fb(), HASH_ENTER, hash_search(), i, InvalidBlockNumber, GISTNodeBuffer::isTemp, lcons(), GISTNodeBuffer::level, MemoryContextSwitchTo(), NIL, GISTBuildBuffers::nodeBuffersTab, GISTNodeBuffer::pageBlocknum, GISTNodeBuffer::pageBuffer, GISTNodeBuffer::queuedForEmptying, and repalloc().
Referenced by gistProcessItup(), and gistRelocateBuildBuffersOnSplit().
|
extern |
Definition at line 613 of file gistget.c.
References GISTSearchItem::blkno, CHECK_FOR_INTERRUPTS, GISTSearchItem::distances, elog, ERROR, fb(), ForwardScanDirection, getNextGISTSearchItem(), getNextNearest(), GIST_ROOT_BLKNO, gistkillitems(), gistScanPage(), IndexScanDescData::indexRelation, IndexScanDescData::instrument, InvalidBlockNumber, IndexScanDescData::kill_prior_tuple, MaxIndexTuplesPerPage, MemoryContextReset(), MemoryContextSwitchTo(), IndexScanInstrumentation::nsearches, IndexScanDescData::numberOfOrderBys, IndexScanDescData::opaque, palloc(), pfree(), pgstat_count_index_scan, IndexScanDescData::xs_heaptid, IndexScanDescData::xs_hitup, IndexScanDescData::xs_recheck, and IndexScanDescData::xs_want_itup.
Referenced by gisthandler().
Definition at line 773 of file gistutil.c.
References b, BufferGetPage(), and gistinitpage().
Referenced by gistbuild(), gistbuildempty(), gistplacetopage(), and gistRedoPageSplitRecord().
|
extern |
Definition at line 44 of file gistbuildbuffers.c.
References GISTBuildBuffers::bufferEmptyingQueue, GISTBuildBuffers::buffersOnLevels, GISTBuildBuffers::buffersOnLevelsLen, BufFileCreateTemp(), GISTBuildBuffers::context, CurrentMemoryContext, fb(), GISTBuildBuffers::freeBlocks, GISTBuildBuffers::freeBlocksLen, HASH_BLOBS, HASH_CONTEXT, hash_create(), HASH_ELEM, GISTBuildBuffers::levelStep, GISTBuildBuffers::loadedBuffers, GISTBuildBuffers::loadedBuffersCount, GISTBuildBuffers::loadedBuffersLen, GISTBuildBuffers::nFileBlocks, GISTBuildBuffers::nFreeBlocks, NIL, GISTBuildBuffers::nodeBuffersTab, GISTBuildBuffers::pagesPerBuffer, palloc_array, palloc_object, GISTBuildBuffers::pfile, and GISTBuildBuffers::rootlevel.
Referenced by gistInitBuffering().
Definition at line 757 of file gistutil.c.
References fb(), GISTPageOpaqueData::flags, GISTPageOpaqueData::gist_page_id, GIST_PAGE_ID, GistPageGetOpaque, InvalidBlockNumber, PageInit(), and GISTPageOpaqueData::rightlink.
Referenced by gist_indexsortbuild(), gist_indexsortbuild_levelstate_add(), gist_indexsortbuild_levelstate_flush(), and GISTInitBuffer().
|
extern |
Definition at line 166 of file gist.c.
References createTempGistContext(), fb(), gistdoinsert(), gistFormTuple(), IndexInfo::ii_AmCache, IndexInfo::ii_Context, initGISTstate(), MemoryContextReset(), MemoryContextSwitchTo(), IndexTupleData::t_tid, GISTSTATE::tempCxt, and values.
Referenced by gisthandler().
|
extern |
Definition at line 114 of file gistutil.c.
References fb(), len, and repalloc_array.
Referenced by gist_indexsortbuild_levelstate_flush(), and gistplacetopage().
Definition at line 281 of file gistutil.c.
References a, b, GISTSTATE::equalFn, FunctionCall3Coll(), PointerGetDatum(), and GISTSTATE::supportCollation.
Referenced by gistgetadjusted(), and gistUserPicksplit().
|
extern |
Definition at line 155 of file gistutil.c.
References fb(), FunctionCall2Coll(), GEVHDRSZ, gistdentryinit(), i, index_getattr(), j, GISTSTATE::leafTupdesc, len, GistEntryVector::n, TupleDescData::natts, GISTSTATE::nonLeafTupdesc, palloc(), PointerGetDatum(), GISTSTATE::supportCollation, and GISTSTATE::unionFn.
Referenced by gistunion(), and gistunionsubkeyvec().
|
extern |
Definition at line 233 of file gistutil.c.
References fb(), FunctionCall2Coll(), GEVHDRSZ, GistEntryVector::n, PointerGetDatum(), storage, GISTSTATE::supportCollation, and GISTSTATE::unionFn.
Referenced by gistgetadjusted(), and supportSecondarySplit().
Definition at line 824 of file gistutil.c.
References BMR_REL, BufferGetPage(), ConditionalLockBuffer(), EB_LOCK_FIRST, ExtendBufferedRel(), fb(), GetFreeIndexPage(), GIST_UNLOCK, gistcheckpage(), GistPageGetDeleteXid(), gistPageRecyclable(), gistXLogPageReuse(), InvalidBlockNumber, LockBuffer(), MAIN_FORKNUM, PageIsNew(), ReadBuffer(), RelationNeedsWAL, ReleaseBuffer(), and XLogStandbyInfoActive.
Referenced by gistbuild(), and gistplacetopage().
|
extern |
Definition at line 59 of file gistutil.c.
References fb(), i, IndexTupleSize(), InvalidOffsetNumber, len, PageGetFreeSpace(), PageGetItem(), and PageGetItemId().
Referenced by gistplacetopage().
Definition at line 912 of file gistutil.c.
References build_reloptions(), fb(), fillfactor, lengthof, RELOPT_KIND_GIST, RELOPT_TYPE_ENUM, RELOPT_TYPE_INT, and validate().
Referenced by gisthandler().
Definition at line 888 of file gistutil.c.
References fb(), GistPageGetDeleteXid(), GistPageIsDeleted, GlobalVisCheckRemovableFullXid(), and PageIsNew().
Referenced by gistNewBuffer(), and gistvacuumpage().
|
extern |
Definition at line 724 of file gistutil.c.
References fb(), FmgrInfo::fn_strict, FunctionCall3Coll(), get_float4_infinity(), GISTSTATE::penaltyFn, PointerGetDatum(), and GISTSTATE::supportCollation.
Referenced by findDontCares(), gistchoose(), gistRelocateBuildBuffersOnSplit(), placeOne(), and supportSecondarySplit().
|
extern |
Definition at line 231 of file gist.c.
References Assert, BufferGetBlockNumber(), BufferGetPage(), BufferIsValid(), data, elog, END_CRIT_SECTION, ERROR, F_LEAF, fb(), FirstOffsetNumber, GIST_MAX_SPLIT_PAGES, GIST_ROOT_BLKNO, GistBuildLSN, GistClearFollowRight, gistextractpage(), gistfillbuffer(), gistfillitupvec(), GistFollowRight, gistGetFakeLSN(), GISTInitBuffer(), gistjoinvector(), GistMarkFollowRight, gistNewBuffer(), gistnospace(), GistPageGetNSN, GistPageGetOpaque, GistPageHasGarbage, GistPageIsDeleted, GistPageIsLeaf, GistPageSetNSN, gistprunepage(), gistSplit(), GistTupleSetValid, gistXLogSplit(), gistXLogUpdate(), i, IndexTupleSize(), InvalidBlockNumber, InvalidOffsetNumber, InvalidXLogRecPtr, ItemPointerEquals(), ItemPointerSetBlockNumber(), lappend(), MarkBufferDirty(), NIL, OffsetNumberIsValid, PageAddItem, PageGetTempPageCopySpecial(), PageIndexTupleDelete(), PageIndexTupleOverwrite(), PageRestoreTempPage(), PageSetLSN(), palloc_array, palloc_object, PredicateLockPageSplit(), RelationGetRelationName, RelationNeedsWAL, START_CRIT_SECTION, UnlockReleaseBuffer(), and XLogEnsureRecordSpace().
Referenced by gistbufferinginserttuples(), and gistinserttuples().
|
extern |
Definition at line 404 of file gistbuildbuffers.c.
References Assert, GISTNodeBuffer::blocksCount, fb(), gistBuffersReleaseBlock(), gistGetItupFromPage(), gistLoadNodeBuffer(), InvalidBlockNumber, PAGE_IS_EMPTY, GISTNodeBuffer::pageBuffer, GISTBuildBuffers::pfile, pfree(), GISTNodeBufferPage::prev, and ReadTempFileBlock().
Referenced by gistProcessEmptyingQueue(), and gistRelocateBuildBuffersOnSplit().
|
extern |
Definition at line 933 of file gistutil.c.
References AMPROP_DISTANCE_ORDERABLE, AMPROP_RETURNABLE, fb(), get_index_column_opclass(), get_opclass_opfamily_and_input_type(), GIST_COMPRESS_PROC, GIST_DISTANCE_PROC, GIST_FETCH_PROC, Int16GetDatum(), ObjectIdGetDatum(), OidIsValid, and SearchSysCacheExists4.
Referenced by gisthandler().
|
extern |
Definition at line 334 of file gistbuildbuffers.c.
References GISTNodeBuffer::blocksCount, BUFFER_HALF_FILLED, GISTBuildBuffers::bufferEmptyingQueue, GISTBuildBuffers::context, fb(), gistAddLoadedBuffer(), gistAllocateNewPageBuffer(), gistBuffersGetFreeBlock(), gistLoadNodeBuffer(), gistPlaceItupToPage(), lcons(), MAXALIGN, MemoryContextSwitchTo(), PAGE_FREE_SPACE, PAGE_NO_SPACE, GISTNodeBuffer::pageBuffer, GISTBuildBuffers::pfile, GISTNodeBufferPage::prev, GISTNodeBuffer::queuedForEmptying, and WriteTempFileBlock().
Referenced by gistProcessItup(), and gistRelocateBuildBuffersOnSplit().
|
extern |
Definition at line 531 of file gistbuildbuffers.c.
References Assert, GISTNodeBuffer::blocksCount, BufferGetBlockNumber(), fb(), foreach_current_index, GIST_ROOT_BLKNO, gistDeCompressAtt(), gistgetadjusted(), gistGetNodeBuffer(), gistpenalty(), gistPopItupFromNodeBuffer(), gistPushItupToNodeBuffer(), HASH_FIND, hash_search(), i, INDEX_MAX_KEYS, IndexRelationGetNumberOfKeyAttributes, InvalidBlockNumber, j, LEVEL_HAS_BUFFERS, lfirst, list_length(), GISTBuildBuffers::nodeBuffersTab, GISTNodeBuffer::pageBlocknum, GISTNodeBuffer::pageBuffer, palloc_array, and pfree().
Referenced by gistbufferinginserttuples().
|
extern |
Definition at line 1450 of file gist.c.
References Assert, SplitPageLayout::block, check_stack_depth(), ereport, errcode(), errmsg(), ERROR, fb(), gistfillitupvec(), gistfitpage(), gistFormTuple(), GiSTPageSize, gistSplit(), gistSplitByKey(), i, IndexTupleSize(), SplitPageLayout::itup, len, SplitPageLayout::lenlist, SplitPageLayout::list, TupleDescData::natts, GISTSTATE::nonLeafTupdesc, gistxlogPage::num, palloc_array, RelationGetRelationName, ROTATEDIST, GistSplitVector::spl_lattr, GIST_SPLITVEC::spl_left, GistSplitVector::spl_lisnull, GIST_SPLITVEC::spl_nleft, GIST_SPLITVEC::spl_nright, GistSplitVector::spl_rattr, GIST_SPLITVEC::spl_right, GistSplitVector::spl_risnull, and GistSplitVector::splitVector.
Referenced by gist_indexsortbuild_levelstate_flush(), gistplacetopage(), and gistSplit().
|
extern |
Definition at line 623 of file gistsplit.c.
References Assert, fb(), GEVHDRSZ, gistdentryinit(), gistSplitByKey(), gistSplitHalf(), gistunionsubkey(), gistUserPicksplit(), i, index_getattr(), j, GISTSTATE::leafTupdesc, len, TupleDescData::natts, GISTSTATE::nonLeafTupdesc, palloc(), palloc_array, GistSplitVector::spl_dontcare, GIST_SPLITVEC::spl_left, GistSplitVector::spl_lisnull, GIST_SPLITVEC::spl_nleft, GIST_SPLITVEC::spl_nright, GIST_SPLITVEC::spl_right, GistSplitVector::spl_risnull, and GistSplitVector::splitVector.
Referenced by gistSplit(), and gistSplitByKey().
|
extern |
Definition at line 219 of file gistutil.c.
References fb(), gistFormTuple(), gistMakeUnionItVec(), INDEX_MAX_KEYS, and len.
Referenced by gist_indexsortbuild_levelstate_flush().
|
extern |
Definition at line 270 of file gistbuildbuffers.c.
References gistUnloadNodeBuffer(), i, GISTBuildBuffers::loadedBuffers, and GISTBuildBuffers::loadedBuffersCount.
Referenced by gistProcessEmptyingQueue().
|
extern |
Definition at line 75 of file gistvacuum.c.
References IndexVacuumInfo::analyze_only, IndexVacuumInfo::estimated_count, fb(), gistvacuumscan(), IndexVacuumInfo::num_heap_tuples, IndexBulkDeleteResult::num_index_tuples, and palloc0_object.
Referenced by gisthandler().
Definition at line 32 of file gistvalidate.c.
References check_amop_signature(), check_amoptsproc_signature(), check_amproc_signature(), elog, ereport, errcode(), errmsg(), ERROR, fb(), format_operator(), format_procedure(), get_op_rettype(), get_opfamily_name(), get_opfamily_proc(), GETSTRUCT(), GIST_COMPRESS_PROC, GIST_CONSISTENT_PROC, GIST_DECOMPRESS_PROC, GIST_DISTANCE_PROC, GIST_EQUAL_PROC, GIST_FETCH_PROC, GIST_OPTIONS_PROC, GIST_PENALTY_PROC, GIST_PICKSPLIT_PROC, GIST_SORTSUPPORT_PROC, GIST_TRANSLATE_CMPTYPE_PROC, GIST_UNION_PROC, GISTNProcs, HeapTupleIsValid, i, identify_opfamily_groups(), INFO, lfirst, NameStr, ObjectIdGetDatum(), OidIsValid, opfamily_can_sort_type(), ReleaseCatCacheList(), ReleaseSysCache(), SearchSysCache1(), and SearchSysCacheList1.
Referenced by gisthandler().
|
extern |
Definition at line 574 of file gistxlog.c.
References fb(), XLOG_GIST_ASSIGN_LSN, XLOG_MARK_UNIMPORTANT, XLogBeginInsert(), XLogInsert(), XLogRegisterData(), and XLogSetRecordFlags().
Referenced by gistGetFakeLSN().
|
extern |
Definition at line 668 of file gistxlog.c.
References fb(), gistxlogDelete::isCatalogRel, REGBUF_STANDARD, RelationIsAccessibleInLogicalDecoding, SizeOfGistxlogDelete, XLOG_GIST_DELETE, XLogBeginInsert(), XLogInsert(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by gistprunepage().
|
extern |
Definition at line 550 of file gistxlog.c.
References gistxlogPageDelete::deleteXid, fb(), REGBUF_STANDARD, SizeOfGistxlogPageDelete, XLOG_GIST_PAGE_DELETE, XLogBeginInsert(), XLogInsert(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by gistdeletepage().
|
extern |
Definition at line 592 of file gistxlog.c.
References fb(), gistxlogPageReuse::isCatalogRel, RelationData::rd_locator, RelationIsAccessibleInLogicalDecoding, SizeOfGistxlogPageReuse, XLOG_GIST_PAGE_REUSE, XLogBeginInsert(), XLogInsert(), and XLogRegisterData().
Referenced by gistNewBuffer().
|
extern |
Definition at line 493 of file gistxlog.c.
References SplitPageLayout::block, SplitPageLayout::buffer, BufferIsValid(), fb(), i, SplitPageLayout::lenlist, SplitPageLayout::list, SplitPageLayout::next, gistxlogPage::num, REGBUF_STANDARD, REGBUF_WILL_INIT, XLOG_GIST_PAGE_SPLIT, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by gistplacetopage().
|
extern |
Definition at line 627 of file gistxlog.c.
References BufferIsValid(), fb(), i, IndexTupleSize(), gistxlogPageUpdate::ntodelete, REGBUF_STANDARD, XLOG_GIST_PAGE_UPDATE, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by gistplacetopage(), and gistvacuumpage().
Definition at line 1537 of file gist.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, GISTSTATE::compressFn, GISTSTATE::consistentFn, CreateTupleDescTruncatedCopy(), CurrentMemoryContext, GISTSTATE::decompressFn, GISTSTATE::distanceFn, elog, GISTSTATE::equalFn, ERROR, fb(), GISTSTATE::fetchFn, fmgr_info_copy(), FmgrInfo::fn_oid, GIST_COMPRESS_PROC, GIST_CONSISTENT_PROC, GIST_DECOMPRESS_PROC, GIST_DISTANCE_PROC, GIST_EQUAL_PROC, GIST_FETCH_PROC, GIST_PENALTY_PROC, GIST_PICKSPLIT_PROC, GIST_UNION_PROC, i, index_getprocid(), index_getprocinfo(), INDEX_MAX_KEYS, IndexRelationGetNumberOfKeyAttributes, InvalidOid, GISTSTATE::leafTupdesc, MemoryContextSwitchTo(), GISTSTATE::nonLeafTupdesc, OidIsValid, palloc_object, GISTSTATE::penaltyFn, GISTSTATE::picksplitFn, GISTSTATE::scanCxt, GISTSTATE::supportCollation, GISTSTATE::tempCxt, and GISTSTATE::unionFn.
Referenced by gistbeginscan(), gistbuild(), and gistinsert().