|
static void | BTPageSetDeleted (Page page, FullTransactionId safexid) |
|
static FullTransactionId | BTPageGetDeleteXid (Page page) |
|
static bool | BTPageIsRecyclable (Page page, Relation heaprel) |
|
| StaticAssertDecl (BT_OFFSET_MASK >=INDEX_MAX_KEYS, "BT_OFFSET_MASK can't fit INDEX_MAX_KEYS") |
|
static bool | BTreeTupleIsPivot (IndexTuple itup) |
|
static bool | BTreeTupleIsPosting (IndexTuple itup) |
|
static void | BTreeTupleSetPosting (IndexTuple itup, uint16 nhtids, int postingoffset) |
|
static uint16 | BTreeTupleGetNPosting (IndexTuple posting) |
|
static uint32 | BTreeTupleGetPostingOffset (IndexTuple posting) |
|
static ItemPointer | BTreeTupleGetPosting (IndexTuple posting) |
|
static ItemPointer | BTreeTupleGetPostingN (IndexTuple posting, int n) |
|
static BlockNumber | BTreeTupleGetDownLink (IndexTuple pivot) |
|
static void | BTreeTupleSetDownLink (IndexTuple pivot, BlockNumber blkno) |
|
static void | BTreeTupleSetNAtts (IndexTuple itup, uint16 nkeyatts, bool heaptid) |
|
static BlockNumber | BTreeTupleGetTopParent (IndexTuple leafhikey) |
|
static void | BTreeTupleSetTopParent (IndexTuple leafhikey, BlockNumber blkno) |
|
static ItemPointer | BTreeTupleGetHeapTID (IndexTuple itup) |
|
static ItemPointer | BTreeTupleGetMaxHeapTID (IndexTuple itup) |
|
void | btbuildempty (Relation index) |
|
bool | btinsert (Relation rel, Datum *values, bool *isnull, ItemPointer ht_ctid, Relation heapRel, IndexUniqueCheck checkUnique, bool indexUnchanged, struct IndexInfo *indexInfo) |
|
IndexScanDesc | btbeginscan (Relation rel, int nkeys, int norderbys) |
|
Size | btestimateparallelscan (int nkeys, int norderbys) |
|
void | btinitparallelscan (void *target) |
|
bool | btgettuple (IndexScanDesc scan, ScanDirection dir) |
|
int64 | btgetbitmap (IndexScanDesc scan, TIDBitmap *tbm) |
|
void | btrescan (IndexScanDesc scan, ScanKey scankey, int nscankeys, ScanKey orderbys, int norderbys) |
|
void | btparallelrescan (IndexScanDesc scan) |
|
void | btendscan (IndexScanDesc scan) |
|
void | btmarkpos (IndexScanDesc scan) |
|
void | btrestrpos (IndexScanDesc scan) |
|
IndexBulkDeleteResult * | btbulkdelete (IndexVacuumInfo *info, IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback, void *callback_state) |
|
IndexBulkDeleteResult * | btvacuumcleanup (IndexVacuumInfo *info, IndexBulkDeleteResult *stats) |
|
bool | btcanreturn (Relation index, int attno) |
|
bool | _bt_parallel_seize (IndexScanDesc scan, BlockNumber *pageno, bool first) |
|
void | _bt_parallel_release (IndexScanDesc scan, BlockNumber scan_page) |
|
void | _bt_parallel_done (IndexScanDesc scan) |
|
void | _bt_parallel_primscan_schedule (IndexScanDesc scan, BlockNumber prev_scan_page) |
|
void | _bt_dedup_pass (Relation rel, Buffer buf, IndexTuple newitem, Size newitemsz, bool bottomupdedup) |
|
bool | _bt_bottomupdel_pass (Relation rel, Buffer buf, Relation heapRel, Size newitemsz) |
|
void | _bt_dedup_start_pending (BTDedupState state, IndexTuple base, OffsetNumber baseoff) |
|
bool | _bt_dedup_save_htid (BTDedupState state, IndexTuple itup) |
|
Size | _bt_dedup_finish_pending (Page newpage, BTDedupState state) |
|
IndexTuple | _bt_form_posting (IndexTuple base, ItemPointer htids, int nhtids) |
|
void | _bt_update_posting (BTVacuumPosting vacposting) |
|
IndexTuple | _bt_swap_posting (IndexTuple newitem, IndexTuple oposting, int postingoff) |
|
bool | _bt_doinsert (Relation rel, IndexTuple itup, IndexUniqueCheck checkUnique, bool indexUnchanged, Relation heapRel) |
|
void | _bt_finish_split (Relation rel, Relation heaprel, Buffer lbuf, BTStack stack) |
|
Buffer | _bt_getstackbuf (Relation rel, Relation heaprel, BTStack stack, BlockNumber child) |
|
OffsetNumber | _bt_findsplitloc (Relation rel, Page origpage, OffsetNumber newitemoff, Size newitemsz, IndexTuple newitem, bool *newitemonleft) |
|
void | _bt_initmetapage (Page page, BlockNumber rootbknum, uint32 level, bool allequalimage) |
|
bool | _bt_vacuum_needs_cleanup (Relation rel) |
|
void | _bt_set_cleanup_info (Relation rel, BlockNumber num_delpages) |
|
void | _bt_upgrademetapage (Page page) |
|
Buffer | _bt_getroot (Relation rel, Relation heaprel, int access) |
|
Buffer | _bt_gettrueroot (Relation rel) |
|
int | _bt_getrootheight (Relation rel) |
|
void | _bt_metaversion (Relation rel, bool *heapkeyspace, bool *allequalimage) |
|
void | _bt_checkpage (Relation rel, Buffer buf) |
|
Buffer | _bt_getbuf (Relation rel, BlockNumber blkno, int access) |
|
Buffer | _bt_allocbuf (Relation rel, Relation heaprel) |
|
Buffer | _bt_relandgetbuf (Relation rel, Buffer obuf, BlockNumber blkno, int access) |
|
void | _bt_relbuf (Relation rel, Buffer buf) |
|
void | _bt_lockbuf (Relation rel, Buffer buf, int access) |
|
void | _bt_unlockbuf (Relation rel, Buffer buf) |
|
bool | _bt_conditionallockbuf (Relation rel, Buffer buf) |
|
void | _bt_upgradelockbufcleanup (Relation rel, Buffer buf) |
|
void | _bt_pageinit (Page page, Size size) |
|
void | _bt_delitems_vacuum (Relation rel, Buffer buf, OffsetNumber *deletable, int ndeletable, BTVacuumPosting *updatable, int nupdatable) |
|
void | _bt_delitems_delete_check (Relation rel, Buffer buf, Relation heapRel, TM_IndexDeleteOp *delstate) |
|
void | _bt_pagedel (Relation rel, Buffer leafbuf, BTVacState *vstate) |
|
void | _bt_pendingfsm_init (Relation rel, BTVacState *vstate, bool cleanuponly) |
|
void | _bt_pendingfsm_finalize (Relation rel, BTVacState *vstate) |
|
BTStack | _bt_search (Relation rel, Relation heaprel, BTScanInsert key, Buffer *bufP, int access) |
|
OffsetNumber | _bt_binsrch_insert (Relation rel, BTInsertState insertstate) |
|
int32 | _bt_compare (Relation rel, BTScanInsert key, Page page, OffsetNumber offnum) |
|
bool | _bt_first (IndexScanDesc scan, ScanDirection dir) |
|
bool | _bt_next (IndexScanDesc scan, ScanDirection dir) |
|
Buffer | _bt_get_endpoint (Relation rel, uint32 level, bool rightmost) |
|
BTScanInsert | _bt_mkscankey (Relation rel, IndexTuple itup) |
|
void | _bt_freestack (BTStack stack) |
|
bool | _bt_start_prim_scan (IndexScanDesc scan, ScanDirection dir) |
|
void | _bt_start_array_keys (IndexScanDesc scan, ScanDirection dir) |
|
void | _bt_preprocess_keys (IndexScanDesc scan) |
|
bool | _bt_checkkeys (IndexScanDesc scan, BTReadPageState *pstate, bool arrayKeys, IndexTuple tuple, int tupnatts) |
|
void | _bt_killitems (IndexScanDesc scan) |
|
BTCycleId | _bt_vacuum_cycleid (Relation rel) |
|
BTCycleId | _bt_start_vacuum (Relation rel) |
|
void | _bt_end_vacuum (Relation rel) |
|
void | _bt_end_vacuum_callback (int code, Datum arg) |
|
Size | BTreeShmemSize (void) |
|
void | BTreeShmemInit (void) |
|
bytea * | btoptions (Datum reloptions, bool validate) |
|
bool | btproperty (Oid index_oid, int attno, IndexAMProperty prop, const char *propname, bool *res, bool *isnull) |
|
char * | btbuildphasename (int64 phasenum) |
|
IndexTuple | _bt_truncate (Relation rel, IndexTuple lastleft, IndexTuple firstright, BTScanInsert itup_key) |
|
int | _bt_keep_natts_fast (Relation rel, IndexTuple lastleft, IndexTuple firstright) |
|
bool | _bt_check_natts (Relation rel, bool heapkeyspace, Page page, OffsetNumber offnum) |
|
void | _bt_check_third_page (Relation rel, Relation heap, bool needheaptidspace, Page page, IndexTuple newtup) |
|
bool | _bt_allequalimage (Relation rel, bool debugmessage) |
|
bool | btvalidate (Oid opclassoid) |
|
void | btadjustmembers (Oid opfamilyoid, Oid opclassoid, List *operators, List *functions) |
|
IndexBuildResult * | btbuild (Relation heap, Relation index, struct IndexInfo *indexInfo) |
|
void | _bt_parallel_build_main (dsm_segment *seg, shm_toc *toc) |
|
Definition at line 685 of file nbtsearch.c.
725 ncmpkey =
Min(ntupatts,
key->keysz);
728 scankey =
key->scankeys;
729 for (
int i = 1;
i <= ncmpkey;
i++)
787 if (
key->keysz > ntupatts)
796 if (
key->scantid == NULL)
821 if (!
key->backward &&
key->keysz == ntupatts && heapTid == NULL &&
#define INVERT_COMPARE_RESULT(var)
Datum FunctionCall2Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2)
int32 ItemPointerCompare(ItemPointer arg1, ItemPointer arg2)
static Datum index_getattr(IndexTuple tup, int attnum, TupleDesc tupleDesc, bool *isnull)
#define SK_BT_NULLS_FIRST
static ItemPointer BTreeTupleGetMaxHeapTID(IndexTuple itup)
bool _bt_check_natts(Relation rel, bool heapkeyspace, Page page, OffsetNumber offnum)
static int32 DatumGetInt32(Datum X)
References _bt_check_natts(), Assert, BTPageGetOpaque, BTreeTupleGetHeapTID(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetNAtts, BTreeTupleIsPosting(), DatumGetInt32(), FunctionCall2Coll(), i, index_getattr(), IndexRelationGetNumberOfKeyAttributes, INVERT_COMPARE_RESULT, ItemPointerCompare(), sort-test::key, Min, P_FIRSTDATAKEY, P_ISLEAF, PageGetItem(), PageGetItemId(), RelationGetDescr, ScanKeyData::sk_argument, ScanKeyData::sk_attno, SK_BT_DESC, SK_BT_NULLS_FIRST, ScanKeyData::sk_collation, ScanKeyData::sk_flags, ScanKeyData::sk_func, and SK_ISNULL.
Referenced by _bt_binsrch(), _bt_binsrch_insert(), _bt_check_unique(), _bt_findinsertloc(), _bt_moveright(), _bt_search_insert(), bt_rootdescend(), bt_target_page_check(), invariant_g_offset(), invariant_l_nontarget_offset(), invariant_l_offset(), and invariant_leq_offset().
Definition at line 58 of file nbtdedup.c.
69 bool singlevalstrat =
false;
85 state->deduplicate =
true;
91 state->basetupsize = 0;
97 state->phystupsize = 0;
99 state->nintervals = 0;
130 elog(
ERROR,
"deduplication failed to add highkey");
133 for (offnum = minoff;
142 if (offnum == minoff)
150 else if (
state->deduplicate &&
190 if (
state->nmaxitems == 5)
192 else if (
state->nmaxitems == 6)
194 state->deduplicate =
false;
195 singlevalstrat =
false;
217 if (
state->nintervals == 0)
void MarkBufferDirty(Buffer buffer)
void PageRestoreTempPage(Page tempPage, Page oldPage)
Page PageGetTempPageCopySpecial(Page page)
static void PageSetLSN(Page page, XLogRecPtr lsn)
static XLogRecPtr PageGetLSN(const char *page)
#define PG_USED_FOR_ASSERTS_ONLY
#define ItemIdGetLength(itemId)
#define START_CRIT_SECTION()
#define END_CRIT_SECTION()
static bool _bt_do_singleval(Relation rel, Page page, BTDedupState state, OffsetNumber minoff, IndexTuple newitem)
Size _bt_dedup_finish_pending(Page newpage, BTDedupState state)
static void _bt_singleval_fillfactor(Page page, BTDedupState state, Size newitemsz)
#define P_HAS_GARBAGE(opaque)
void XLogRegisterBufData(uint8 block_id, const char *data, uint32 len)
void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags)
References _bt_dedup_finish_pending(), _bt_dedup_save_htid(), _bt_dedup_start_pending(), _bt_do_singleval(), _bt_keep_natts_fast(), _bt_singleval_fillfactor(), Assert, BTMaxItemSize, BTP_HAS_GARBAGE, BTPageGetOpaque, BTPageOpaqueData::btpo_flags, buf, BufferGetPage(), elog, END_CRIT_SECTION, ERROR, INDEX_SIZE_MASK, IndexRelationGetNumberOfKeyAttributes, InvalidOffsetNumber, ItemIdGetLength, ItemIdIsDead, MarkBufferDirty(), Min, xl_btree_dedup::nintervals, OffsetNumberNext, P_FIRSTDATAKEY, P_HAS_GARBAGE, P_HIKEY, P_RIGHTMOST, PageAddItem, PageGetExactFreeSpace(), PageGetItem(), PageGetItemId(), PageGetLSN(), PageGetMaxOffsetNumber(), PageGetTempPageCopySpecial(), PageRestoreTempPage(), PageSetLSN(), palloc(), pfree(), PG_USED_FOR_ASSERTS_ONLY, REGBUF_STANDARD, RelationNeedsWAL, SizeOfBtreeDedup, START_CRIT_SECTION, XLOG_BTREE_DEDUP, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by _bt_delete_or_dedup_one_page().
Definition at line 1513 of file nbtpage.c.
1565 if (idxoffnum == postingidxoffnum)
1584 deletable[ndeletable++] = idxoffnum;
1596 postingidxoffnum = idxoffnum;
1600 for (
int p = 0; p < nitem; p++)
1611 for (; nestedi < delstate->
ndeltids; nestedi++)
1639 if (vacposting == NULL)
1643 vacposting->
itup = itup;
1652 if (vacposting == NULL)
1659 deletable[ndeletable++] = idxoffnum;
1668 updatable[nupdatable++] = vacposting;
1674 deletable, ndeletable, updatable, nupdatable);
1677 for (
int i = 0;
i < nupdatable;
i++)
bool ItemPointerEquals(ItemPointer pointer1, ItemPointer pointer2)
#define MaxIndexTuplesPerPage
static void _bt_delitems_delete(Relation rel, Buffer buf, TransactionId snapshotConflictHorizon, bool isCatalogRel, OffsetNumber *deletable, int ndeletable, BTVacuumPosting *updatable, int nupdatable)
static int _bt_delitems_cmp(const void *a, const void *b)
static ItemPointer BTreeTupleGetPostingN(IndexTuple posting, int n)
#define OffsetNumberIsValid(offsetNumber)
#define qsort(a, b, c, d)
uint16 deletetids[FLEXIBLE_ARRAY_MEMBER]
OffsetNumber updatedoffset
static TransactionId table_index_delete_tuples(Relation rel, TM_IndexDeleteOp *delstate)
#define InvalidTransactionId
References _bt_delitems_cmp(), _bt_delitems_delete(), Assert, TM_IndexDeleteOp::bottomup, BTreeTupleGetHeapTID(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetNPosting(), BTreeTupleGetPostingN(), BTreeTupleIsPosting(), buf, BufferGetPage(), BTVacuumPostingData::deletetids, TM_IndexDeleteOp::deltids, i, TM_IndexDelete::id, TM_IndexStatus::idxoffnum, InvalidOffsetNumber, InvalidTransactionId, ItemPointerCompare(), ItemPointerEquals(), BTVacuumPostingData::itup, TM_IndexStatus::knowndeletable, MaxIndexTuplesPerPage, BTVacuumPostingData::ndeletedtids, TM_IndexDeleteOp::ndeltids, OffsetNumberIsValid, PageGetItem(), PageGetItemId(), palloc(), pfree(), qsort, RelationIsAccessibleInLogicalDecoding, TM_IndexDeleteOp::status, IndexTupleData::t_tid, table_index_delete_tuples(), TM_IndexDelete::tid, BTVacuumPostingData::updatedoffset, and XLogStandbyInfoActive.
Referenced by _bt_bottomupdel_pass(), and _bt_simpledel_pass().
Definition at line 129 of file nbtsplitloc.c.
149 double fillfactormult;
158 leftspace = rightspace =
177 state.origpage = origpage;
178 state.newitem = newitem;
179 state.newitemsz = newitemsz;
182 state.leftspace = leftspace;
183 state.rightspace = rightspace;
184 state.olddataitemstotal = olddataitemstotal;
185 state.minfirstrightsz = SIZE_MAX;
186 state.newitemoff = newitemoff;
198 state.maxsplits = maxoff;
206 olddataitemstoleft = 0;
224 if (offnum < newitemoff)
226 else if (offnum > newitemoff)
243 olddataitemstoleft += itemsz;
251 Assert(olddataitemstoleft == olddataitemstotal);
252 if (newitemoff > maxoff)
259 if (
state.nsplits == 0)
260 elog(
ERROR,
"could not find a feasible split point for index \"%s\"",
283 usemult =
state.is_rightmost;
286 else if (
state.is_rightmost)
290 fillfactormult = leaffillfactor / 100.0;
303 fillfactormult = leaffillfactor / 100.0;
308 for (
int i = 0;
i <
state.nsplits;
i++)
316 *newitemonleft =
true;
326 fillfactormult = 0.50;
334 fillfactormult = 0.50;
341 leftpage =
state.splits[0];
427 return firstrightoff;
#define BTREE_SINGLEVAL_FILLFACTOR
#define BTGetFillFactor(relation)
#define BTREE_NONLEAF_FILLFACTOR
static void _bt_deltasortsplits(FindSplitData *state, double fillfactormult, bool usemult)
static int _bt_strategy(FindSplitData *state, SplitPoint *leftpage, SplitPoint *rightpage, FindSplitStrat *strategy)
static bool _bt_afternewitemoff(FindSplitData *state, OffsetNumber maxoff, int leaffillfactor, bool *usemult)
static void _bt_recsplitloc(FindSplitData *state, OffsetNumber firstrightoff, bool newitemonleft, int olddataitemstoleft, Size firstrightofforigpagetuplesz)
static OffsetNumber _bt_bestsplitloc(FindSplitData *state, int perfectpenalty, bool *newitemonleft, FindSplitStrat strategy)
static int _bt_defaultinterval(FindSplitData *state)
OffsetNumber firstrightoff
References _bt_afternewitemoff(), _bt_bestsplitloc(), _bt_defaultinterval(), _bt_deltasortsplits(), _bt_recsplitloc(), _bt_strategy(), Assert, BTGetFillFactor, BTPageGetOpaque, BTREE_NONLEAF_FILLFACTOR, BTREE_SINGLEVAL_FILLFACTOR, BTreeTupleIsPosting(), elog, ERROR, SplitPoint::firstrightoff, i, IndexRelationGetNumberOfKeyAttributes, ItemIdGetLength, MAXALIGN, SplitPoint::newitemonleft, OffsetNumberNext, P_FIRSTDATAKEY, P_HIKEY, P_ISLEAF, P_RIGHTMOST, PageGetExactFreeSpace(), PageGetItemId(), PageGetMaxOffsetNumber(), PageGetPageSize(), palloc(), pfree(), RelationGetRelationName, SizeOfPageHeaderData, SPLIT_DEFAULT, SPLIT_MANY_DUPLICATES, and SPLIT_SINGLE_VALUE.
Referenced by _bt_split().
Definition at line 879 of file nbtsearch.c.
1052 if (chosen == NULL && impliesNN != NULL &&
1058 chosen = ¬nullkeys[keysz];
1079 startKeys[keysz++] = chosen;
1088 strat_total = strat;
1100 cur->sk_attno != curattr + 1)
1106 curattr =
cur->sk_attno;
1118 switch (
cur->sk_strategy)
1176 for (
i = 0;
i < keysz;
i++)
1201 memcpy(inskey.scankeys +
i, subkey,
sizeof(
ScanKeyData));
1219 bool used_all_subkeys =
false;
1233 memcpy(inskey.scankeys + keysz, subkey,
1238 used_all_subkeys =
true;
1242 if (!used_all_subkeys)
1244 switch (strat_total)
1298 elog(
ERROR,
"missing support function %d(%u,%u) for attribute %d of index \"%s\"",
1321 inskey.anynullkeys =
false;
1322 inskey.scantid = NULL;
1323 inskey.keysz = keysz;
1324 switch (strat_total)
1328 inskey.nextkey =
false;
1329 inskey.backward =
true;
1334 inskey.nextkey =
true;
1335 inskey.backward =
true;
1349 inskey.nextkey =
true;
1350 inskey.backward =
true;
1357 inskey.nextkey =
false;
1358 inskey.backward =
false;
1367 inskey.nextkey =
false;
1368 inskey.backward =
false;
1376 inskey.nextkey =
true;
1377 inskey.backward =
false;
1382 elog(
ERROR,
"unrecognized strat_total: %d", (
int) strat_total);
#define RegProcedureIsValid(p)
FmgrInfo * index_getprocinfo(Relation irel, AttrNumber attnum, uint16 procnum)
void _bt_metaversion(Relation rel, bool *heapkeyspace, bool *allequalimage)
void _bt_unlockbuf(Relation rel, Buffer buf)
void _bt_parallel_done(IndexScanDesc scan)
bool _bt_parallel_seize(IndexScanDesc scan, BlockNumber *pageno, bool first)
#define BTScanPosIsValid(scanpos)
#define BTScanPosInvalidate(scanpos)
static bool _bt_parallel_readpage(IndexScanDesc scan, BlockNumber blkno, ScanDirection dir)
static void _bt_drop_lock_and_maybe_pin(IndexScanDesc scan, BTScanPos sp)
static OffsetNumber _bt_binsrch(Relation rel, BTScanInsert key, Buffer buf)
static bool _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
static bool _bt_steppage(IndexScanDesc scan, ScanDirection dir)
BTStack _bt_search(Relation rel, Relation heaprel, BTScanInsert key, Buffer *bufP, int access)
static bool _bt_readpage(IndexScanDesc scan, ScanDirection dir, OffsetNumber offnum, bool firstPage)
static void _bt_initialize_more_data(BTScanOpaque so, ScanDirection dir)
void _bt_start_array_keys(IndexScanDesc scan, ScanDirection dir)
void _bt_preprocess_keys(IndexScanDesc scan)
#define pgstat_count_index_scan(rel)
void PredicateLockPage(Relation relation, BlockNumber blkno, Snapshot snapshot)
void PredicateLockRelation(Relation relation, Snapshot snapshot)
void ScanKeyEntryInitialize(ScanKey entry, int flags, AttrNumber attributeNumber, StrategyNumber strategy, Oid subtype, Oid collation, RegProcedure procedure, Datum argument)
void ScanKeyEntryInitializeWithInfo(ScanKey entry, int flags, AttrNumber attributeNumber, StrategyNumber strategy, Oid subtype, Oid collation, FmgrInfo *finfo, Datum argument)
#define ScanDirectionIsForward(direction)
#define ScanDirectionIsBackward(direction)
#define BTGreaterStrategyNumber
#define BTLessStrategyNumber
#define BTLessEqualStrategyNumber
#define BTGreaterEqualStrategyNumber
BTScanPosItem items[MaxTIDsPerBTreePage]
struct ParallelIndexScanDescData * parallel_scan
ItemPointerData xs_heaptid
struct SnapshotData * xs_snapshot
#define IsolationIsSerializable()
References _bt_binsrch(), _bt_drop_lock_and_maybe_pin(), _bt_endpoint(), _bt_freestack(), _bt_initialize_more_data(), _bt_metaversion(), _bt_parallel_done(), _bt_parallel_readpage(), _bt_parallel_seize(), _bt_preprocess_keys(), _bt_readpage(), _bt_search(), _bt_start_array_keys(), _bt_steppage(), _bt_unlockbuf(), Assert, BT_READ, BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, BTORDER_PROC, BTScanPosInvalidate, BTScanPosIsValid, buf, BTScanPosData::buf, BufferGetBlockNumber(), BufferIsValid(), cur, BTScanOpaqueData::currPos, BTScanOpaqueData::currTuples, DatumGetPointer(), elog, ERROR, get_opfamily_proc(), i, index_getprocinfo(), INDEX_MAX_KEYS, IndexScanDescData::indexRelation, InvalidBlockNumber, InvalidOid, InvalidStrategy, IsolationIsSerializable, BTScanPosData::itemIndex, BTScanPosData::items, BTScanOpaqueData::keyData, BTScanOpaqueData::needPrimScan, BTScanOpaqueData::numArrayKeys, BTScanOpaqueData::numberOfKeys, IndexScanDescData::opaque, P_NONE, IndexScanDescData::parallel_scan, pgstat_count_index_scan, PredicateLockPage(), PredicateLockRelation(), BTScanOpaqueData::qual_ok, RelationData::rd_opcintype, RelationData::rd_opfamily, RegProcedureIsValid, RelationGetRelationName, ScanDirectionIsBackward, ScanDirectionIsForward, ScanKeyEntryInitialize(), ScanKeyEntryInitializeWithInfo(), ScanKeyData::sk_attno, SK_BT_DESC, SK_BT_NULLS_FIRST, ScanKeyData::sk_flags, SK_ISNULL, SK_ROW_END, SK_ROW_HEADER, SK_ROW_MEMBER, SK_SEARCHNOTNULL, ScanKeyData::sk_strategy, IndexScanDescData::xs_heaptid, IndexScanDescData::xs_itup, IndexScanDescData::xs_snapshot, and IndexScanDescData::xs_want_itup.
Referenced by btgetbitmap(), and btgettuple().
Definition at line 344 of file nbtpage.c.
547 elog(
ERROR,
"no live root page found in index \"%s\"",
553 elog(
ERROR,
"root page %u of index \"%s\" has level %u, expected %u",
void * MemoryContextAlloc(MemoryContext context, Size size)
void _bt_upgrademetapage(Page page)
Buffer _bt_allocbuf(Relation rel, Relation heaprel)
static BTMetaPageData * _bt_getmeta(Relation rel, Buffer metabuf)
#define BTREE_MIN_VERSION
#define SizeOfBtreeNewroot
#define XLOG_BTREE_NEWROOT
uint32 btm_last_cleanup_num_delpages
float8 btm_last_cleanup_num_heap_tuples
MemoryContext rd_indexcxt
References _bt_allocbuf(), _bt_getbuf(), _bt_getmeta(), _bt_lockbuf(), _bt_relandgetbuf(), _bt_relbuf(), _bt_unlockbuf(), _bt_upgrademetapage(), xl_btree_metadata::allequalimage, Assert, BT_READ, BT_WRITE, BTMetaPageData::btm_allequalimage, BTMetaPageData::btm_fastlevel, BTMetaPageData::btm_fastroot, BTMetaPageData::btm_last_cleanup_num_delpages, BTMetaPageData::btm_last_cleanup_num_heap_tuples, BTMetaPageData::btm_level, BTMetaPageData::btm_magic, BTMetaPageData::btm_root, BTMetaPageData::btm_version, BTP_LEAF, BTP_ROOT, BTPageGetOpaque, BTPageOpaqueData::btpo_cycleid, BTPageOpaqueData::btpo_flags, BTPageOpaqueData::btpo_level, BTPageOpaqueData::btpo_next, BTPageOpaqueData::btpo_prev, BTREE_MAGIC, BTREE_METAPAGE, BTREE_MIN_VERSION, BTREE_NOVAC_VERSION, BTREE_VERSION, BufferGetBlockNumber(), BufferGetPage(), elog, END_CRIT_SECTION, ERROR, xl_btree_metadata::fastlevel, xl_btree_metadata::fastroot, InvalidBuffer, xl_btree_metadata::last_cleanup_num_delpages, xl_btree_metadata::level, xl_btree_newroot::level, MarkBufferDirty(), MemoryContextAlloc(), P_IGNORE, P_LEFTMOST, P_NONE, P_RIGHTMOST, PageSetLSN(), pfree(), RelationData::rd_amcache, RelationData::rd_indexcxt, REGBUF_STANDARD, REGBUF_WILL_INIT, RelationGetRelationName, RelationNeedsWAL, xl_btree_metadata::root, xl_btree_newroot::rootblk, SizeOfBtreeNewroot, START_CRIT_SECTION, xl_btree_metadata::version, XLOG_BTREE_NEWROOT, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by _bt_get_endpoint(), and _bt_search().