PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/gin_private.h"
#include "access/ginxlog.h"
#include "access/xloginsert.h"
#include "utils/rel.h"
Go to the source code of this file.
|
static |
Definition at line 527 of file ginentrypage.c.
References buf, entryIsEnoughSpace(), entrySplitPage(), GPTP_INSERT, GPTP_SPLIT, and GinBtreeStack::off.
Referenced by ginPrepareEntryScan().
|
static |
Definition at line 554 of file ginentrypage.c.
References buf, BufferGetPage(), data, elog, GinBtreeEntryInsertData::entry, entryPreparePage(), ERROR, GinBtreeData::index, IndexTupleSize, GinBtreeData::isBuild, GinBtreeEntryInsertData::isDelete, MarkBufferDirty(), GinBtreeStack::off, PageAddItem, REGBUF_STANDARD, RelationGetRelationName, RelationNeedsWAL, XLogRegisterBufData(), and XLogRegisterBuffer().
Referenced by ginPrepareEntryScan().
|
static |
Definition at line 405 of file ginentrypage.c.
References Assert, FirstOffsetNumber, GinGetDownlink, GinPageIsData, GinPageIsLeaf, i, InvalidOffsetNumber, PageGetItem(), PageGetItemId(), and PageGetMaxOffsetNumber().
Referenced by ginPrepareEntryScan().
|
static |
Definition at line 446 of file ginentrypage.c.
References Assert, FirstOffsetNumber, GinGetDownlink, GinPageIsData, GinPageIsLeaf, PageGetItem(), PageGetItemId(), and PageGetMaxOffsetNumber().
Referenced by ginPrepareEntryScan().
|
static |
Definition at line 459 of file ginentrypage.c.
References Assert, buf, BufferGetPage(), GinBtreeEntryInsertData::entry, GinPageIsData, IndexTupleSize, GinBtreeEntryInsertData::isDelete, MAXALIGN, PageGetFreeSpace(), PageGetItem(), and PageGetItemId().
Referenced by entryBeginPlaceToPage().
Definition at line 243 of file ginentrypage.c.
References attnum, GinBtreeData::entryAttnum, GinBtreeData::entryCategory, GinBtreeData::entryKey, getRightMostTuple(), ginCompareAttEntries(), GinPageRightMost, GinBtreeData::ginstate, gintuple_get_attrnum(), gintuple_get_key(), and sort-test::key.
Referenced by ginPrepareEntryScan().
|
static |
Definition at line 270 of file ginentrypage.c.
References Assert, attnum, GinBtreeStack::buffer, BufferGetPage(), GinBtreeData::entryAttnum, GinBtreeData::entryCategory, GinBtreeData::entryKey, FirstOffsetNumber, GinBtreeData::fullScan, GinBtreeData::getLeftMostChild, GIN_ROOT_BLKNO, ginCompareAttEntries(), GinGetDownlink, GinPageIsData, GinPageIsLeaf, GinPageRightMost, GinBtreeData::ginstate, gintuple_get_attrnum(), gintuple_get_key(), sort-test::key, GinBtreeStack::off, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), and GinBtreeStack::predictNumber.
Referenced by ginPrepareEntryScan().
|
static |
Definition at line 346 of file ginentrypage.c.
References Assert, attnum, GinBtreeStack::buffer, BufferGetPage(), GinBtreeData::entryAttnum, GinBtreeData::entryCategory, GinBtreeData::entryKey, FirstOffsetNumber, GinBtreeData::fullScan, ginCompareAttEntries(), GinPageIsData, GinPageIsLeaf, GinBtreeData::ginstate, gintuple_get_attrnum(), gintuple_get_key(), sort-test::key, GinBtreeStack::off, PageGetItem(), PageGetItemId(), and PageGetMaxOffsetNumber().
Referenced by ginPrepareEntryScan().
Definition at line 702 of file ginentrypage.c.
References BufferGetBlockNumber(), BufferGetPage(), GinBtreeEntryInsertData::entry, getRightMostTuple(), GinFormInteriorTuple(), GinBtreeEntryInsertData::isDelete, and palloc().
Referenced by ginPrepareEntryScan().
|
static |
Definition at line 490 of file ginentrypage.c.
References Assert, GinBtreeEntryInsertData::entry, GinPageIsData, GinPageIsLeaf, GinSetDownlink, InvalidBlockNumber, GinBtreeEntryInsertData::isDelete, PageGetItem(), PageGetItemId(), and PageIndexTupleDelete().
Referenced by entryExecPlaceToPage(), and entrySplitPage().
|
static |
Definition at line 602 of file ginentrypage.c.
References BufferGetPage(), PGAlignedBlock::data, elog, GinBtreeEntryInsertData::entry, entryPreparePage(), ERROR, FirstOffsetNumber, GinInitPage(), GinPageGetOpaque, i, GinBtreeData::index, IndexTupleSize, InvalidOffsetNumber, MAXALIGN, GinBtreeStack::off, PageAddItem, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PageGetPageSize(), PageGetTempPageCopy(), RelationGetRelationName, and size.
Referenced by entryBeginPlaceToPage().
|
static |
Definition at line 235 of file ginentrypage.c.
References PageGetItem(), PageGetItemId(), and PageGetMaxOffsetNumber().
Referenced by entryIsMoveRight(), entryPrepareDownlink(), and ginEntryFillRoot().
void ginEntryFillRoot | ( | GinBtree | btree, |
Page | root, | ||
BlockNumber | lblkno, | ||
Page | lpage, | ||
BlockNumber | rblkno, | ||
Page | rpage | ||
) |
Definition at line 723 of file ginentrypage.c.
References elog, ERROR, getRightMostTuple(), GinFormInteriorTuple(), IndexTupleSize, InvalidOffsetNumber, PageAddItem, pfree(), and root.
Referenced by ginPrepareEntryScan().
|
static |
Definition at line 201 of file ginentrypage.c.
References GinGetPostingOffset, GinIsPostingTree, GinPageIsLeaf, GinSetDownlink, INDEX_SIZE_MASK, IndexTupleSize, MAXALIGN, palloc(), and IndexTupleData::t_info.
Referenced by entryPrepareDownlink(), and ginEntryFillRoot().
IndexTuple GinFormTuple | ( | GinState * | ginstate, |
OffsetNumber | attnum, | ||
Datum | key, | ||
GinNullCategory | category, | ||
Pointer | data, | ||
Size | dataSize, | ||
int | nipd, | ||
bool | errorTooBig | ||
) |
Definition at line 44 of file ginentrypage.c.
References Assert, attnum, data, ereport, errcode(), errmsg(), ERROR, GIN_CAT_NORM_KEY, GinCategoryOffset, GinGetPosting, GinMaxItemSize, GinSetNPosting, GinSetNullCategory, GinSetPostingOffset, GinState::index, index_form_tuple(), INDEX_SIZE_MASK, IndexTupleHasNulls, IndexTupleSize, sort-test::key, Max, MAXALIGN, GinState::oneCol, pfree(), RelationGetRelationName, repalloc(), SHORTALIGN, IndexTupleData::t_info, GinState::tupdesc, and UInt16GetDatum().
Referenced by addItemPointersToLeafTuple(), buildFreshLeafTuple(), ginHeapTupleFastCollect(), and ginVacuumEntryPage().
void ginPrepareEntryScan | ( | GinBtree | btree, |
OffsetNumber | attnum, | ||
Datum | key, | ||
GinNullCategory | category, | ||
GinState * | ginstate | ||
) |
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, 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, sort-test::key, GinBtreeData::prepareDownlink, and GinBtreeData::rootBlkno.
Referenced by ginEntryInsert(), and startScanEntry().
ItemPointer ginReadTuple | ( | GinState * | ginstate, |
OffsetNumber | attnum, | ||
IndexTuple | itup, | ||
int * | nitems | ||
) |
Definition at line 162 of file ginentrypage.c.
References elog, ERROR, GinGetNPosting, GinGetPosting, GinItupIsCompressed, ginPostingListDecode(), nitems, and palloc().
Referenced by addItemPointersToLeafTuple(), collectMatchBitmap(), and startScanEntry().