|
PostgreSQL Source Code git master
|
#include "access/amapi.h"#include "access/itup.h"#include "access/sdir.h"#include "catalog/pg_am_d.h"#include "catalog/pg_class.h"#include "catalog/pg_index.h"#include "lib/stringinfo.h"#include "storage/bufmgr.h"#include "storage/dsm.h"#include "storage/shm_toc.h"#include "utils/skipsupport.h"

Go to the source code of this file.
Data Structures | |
| struct | BTPageOpaqueData |
| struct | BTMetaPageData |
| struct | BTDeletedPageData |
| struct | BTPendingFSM |
| struct | BTVacState |
| struct | BTStackData |
| struct | BTScanInsertData |
| struct | BTInsertStateData |
| struct | BTDedupInterval |
| struct | BTDedupStateData |
| struct | BTVacuumPostingData |
| struct | BTScanPosItem |
| struct | BTScanPosData |
| struct | BTArrayKeyInfo |
| struct | BTScanOpaqueData |
| struct | BTOptions |
| #define BT_READ BUFFER_LOCK_SHARE |
| #define BT_WRITE BUFFER_LOCK_EXCLUSIVE |
| #define BTCommuteStrategyNumber | ( | strat | ) | (BTMaxStrategyNumber + 1 - (strat)) |
| #define BTGetDeduplicateItems | ( | relation | ) |
Definition at line 1135 of file nbtree.h.
| #define BTGetFillFactor | ( | relation | ) |
Definition at line 1127 of file nbtree.h.
| #define BTGetTargetPageFreeSpace | ( | relation | ) | (BLCKSZ * (100 - BTGetFillFactor(relation)) / 100) |
| #define BTMaxItemSize |
| #define BTMaxItemSizeNoHeapTid |
| #define BTP_HAS_FULLXID (1 << 8) /* contains BTDeletedPageData */ |
| #define BTP_HAS_GARBAGE (1 << 6) /* page has LP_DEAD tuples (deprecated) */ |
| #define BTPageGetMeta | ( | p | ) | ((BTMetaPageData *) PageGetContents(p)) |
| #define BTPageGetOpaque | ( | page | ) | ((BTPageOpaque) PageGetSpecialPointer(page)) |
| #define BTreeTupleGetNAtts | ( | itup, | |
| rel | |||
| ) |
Definition at line 1027 of file nbtree.h.
| #define INDEX_ALT_TID_MASK INDEX_AM_RESERVED_BIT |
| #define MaxTIDsPerBTreePage |
| #define P_FIRSTDATAKEY | ( | opaque | ) | (P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY) |
| #define P_FIRSTKEY ((OffsetNumber) 2) |
| #define P_HAS_FULLXID | ( | opaque | ) | (((opaque)->btpo_flags & BTP_HAS_FULLXID) != 0) |
| #define P_HAS_GARBAGE | ( | opaque | ) | (((opaque)->btpo_flags & BTP_HAS_GARBAGE) != 0) |
| #define P_HIKEY ((OffsetNumber) 1) |
| #define P_IGNORE | ( | opaque | ) | (((opaque)->btpo_flags & (BTP_DELETED|BTP_HALF_DEAD)) != 0) |
| #define P_INCOMPLETE_SPLIT | ( | opaque | ) | (((opaque)->btpo_flags & BTP_INCOMPLETE_SPLIT) != 0) |
| #define P_ISDELETED | ( | opaque | ) | (((opaque)->btpo_flags & BTP_DELETED) != 0) |
| #define P_ISHALFDEAD | ( | opaque | ) | (((opaque)->btpo_flags & BTP_HALF_DEAD) != 0) |
| #define SK_BT_DESC (INDOPTION_DESC << SK_BT_INDOPTION_SHIFT) |
| #define SK_BT_NULLS_FIRST (INDOPTION_NULLS_FIRST << SK_BT_INDOPTION_SHIFT) |
Definition at line 1181 of file nbtutils.c.
References BTEQUALIMAGE_PROC, DatumGetBool(), DEBUG1, elog, fb(), get_opfamily_proc(), i, IndexRelationGetNumberOfAttributes, IndexRelationGetNumberOfKeyAttributes, ObjectIdGetDatum(), OidFunctionCall1Coll(), OidIsValid, RelationData::rd_indcollation, RelationData::rd_opcintype, RelationData::rd_opfamily, and RelationGetRelationName.
Referenced by _bt_leafbuild(), bt_index_check_callback(), and btbuildempty().
Definition at line 870 of file nbtpage.c.
References _bt_conditionallockbuf(), _bt_pageinit(), _bt_relbuf(), Assert, BMR_REL, BTPageGetDeleteXid(), BTPageIsRecyclable(), buf, BufferGetPage(), BufferGetPageSize(), DEBUG2, EB_LOCK_FIRST, elog, ExtendBufferedRel(), fb(), GetFreeIndexPage(), InvalidBlockNumber, xl_btree_reuse_page::locator, MAIN_FORKNUM, PageIsNew(), RelationData::rd_locator, ReadBuffer(), RelationIsAccessibleInLogicalDecoding, RelationNeedsWAL, RelationUsesLocalBuffers, ReleaseBuffer(), SizeOfBtreeReusePage, VALGRIND_MAKE_MEM_DEFINED, XLOG_BTREE_REUSE_PAGE, XLogBeginInsert(), XLogInsert(), XLogRegisterData(), and XLogStandbyInfoActive.
Referenced by _bt_getroot(), _bt_newlevel(), and _bt_split().
|
extern |
Definition at line 3415 of file nbtreadpage.c.
References _bt_compare_array_skey(), Assert, BTEqualStrategyNumber, cur, BTArrayKeyInfo::cur_elem, BTArrayKeyInfo::elem_values, fb(), BTArrayKeyInfo::num_elems, ScanDirectionIsForward, ScanDirectionIsNoMovement, SK_BT_REQFWD, SK_BT_SKIP, SK_ISNULL, and SK_SEARCHARRAY.
Referenced by _bt_advance_array_keys(), _bt_saoparray_shrink(), and _bt_set_startikey().
|
extern |
Definition at line 470 of file nbtsearch.c.
References _bt_binsrch_posting(), _bt_compare(), Assert, BTPageGetOpaque, BufferGetBlockNumber(), BufferGetPage(), ereport, errcode(), errmsg_internal(), ERROR, fb(), InvalidOffsetNumber, ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), P_FIRSTDATAKEY, P_ISLEAF, PageGetMaxOffsetNumber(), RelationGetRelationName, and unlikely.
Referenced by _bt_check_unique(), _bt_findinsertloc(), and bt_rootdescend().
Definition at line 307 of file nbtdedup.c.
References _bt_bottomupdel_finish_pending(), _bt_dedup_save_htid(), _bt_dedup_start_pending(), _bt_delitems_delete_check(), _bt_keep_natts_fast(), Assert, BTPageGetOpaque, buf, BufferGetBlockNumber(), BufferGetPage(), fb(), IndexRelationGetNumberOfKeyAttributes, InvalidOffsetNumber, ItemIdIsDead, Max, MaxTIDsPerBTreePage, OffsetNumberNext, P_FIRSTDATAKEY, PageGetExactFreeSpace(), PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), palloc(), palloc_array, palloc_object, and pfree().
Referenced by _bt_delete_or_dedup_one_page().
|
extern |
Definition at line 964 of file nbtutils.c.
References Assert, BT_PIVOT_HEAP_TID_ATTR, BTPageGetOpaque, BTreeTupleGetHeapTID(), BTreeTupleGetNAtts, BTreeTupleIsPivot(), BTreeTupleIsPosting(), fb(), FirstOffsetNumber, IndexRelationGetNumberOfAttributes, IndexRelationGetNumberOfKeyAttributes, ItemPointerGetOffsetNumber(), ItemPointerGetOffsetNumberNoCheck(), P_FIRSTDATAKEY, P_HIKEY, P_IGNORE, P_ISLEAF, P_RIGHTMOST, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), and IndexTupleData::t_tid.
Referenced by _bt_compare(), and bt_target_page_check().
|
extern |
Definition at line 1124 of file nbtutils.c.
References BTMaxItemSize, BTMaxItemSizeNoHeapTid, BTPageGetOpaque, BTREE_NOVAC_VERSION, BTREE_VERSION, BTreeTupleGetHeapTID(), elog, ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, errtableconstraint(), fb(), IndexTupleSize(), ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), MAXALIGN, P_ISLEAF, and RelationGetRelationName.
Referenced by _bt_buildadd(), and _bt_findinsertloc().
Definition at line 798 of file nbtpage.c.
References buf, BufferGetBlockNumber(), BufferGetPage(), ereport, errcode(), errhint(), errmsg(), ERROR, fb(), MAXALIGN, PageGetSpecialSize(), PageIsNew(), and RelationGetRelationName.
Referenced by _bt_getbuf(), _bt_relandgetbuf(), _bt_search_insert(), bt_recheck_sibling_links(), btvacuumpage(), and palloc_btree_page().
|
extern |
Definition at line 684 of file nbtsearch.c.
References _bt_check_natts(), Assert, BTPageGetOpaque, BTreeTupleGetHeapTID(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetNAtts, BTreeTupleIsPosting(), DatumGetInt32(), fb(), FunctionCall2Coll(), i, index_getattr(), IndexRelationGetNumberOfKeyAttributes, INVERT_COMPARE_RESULT, ItemPointerCompare(), Min, P_FIRSTDATAKEY, P_ISLEAF, PageGetItem(), PageGetItemId(), RelationGetDescr, SK_BT_DESC, SK_BT_NULLS_FIRST, 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 1094 of file nbtpage.c.
References buf, BufferGetPage(), ConditionalLockBuffer(), fb(), RelationUsesLocalBuffers, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by _bt_allocbuf(), and _bt_search_insert().
|
extern |
Definition at line 555 of file nbtdedup.c.
References _bt_form_posting(), Assert, BTMaxItemSize, elog, ERROR, fb(), IndexTupleSize(), InvalidOffsetNumber, MAXALIGN, OffsetNumberNext, PageAddItem, PageGetMaxOffsetNumber(), and pfree().
Referenced by _bt_dedup_pass(), and btree_xlog_dedup().
|
extern |
Definition at line 59 of file nbtdedup.c.
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, BTPageGetOpaque, buf, BufferGetPage(), elog, END_CRIT_SECTION, ERROR, fb(), 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(), palloc_object, 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().
|
extern |
Definition at line 484 of file nbtdedup.c.
References Assert, BTreeTupleGetNPosting(), BTreeTupleGetPosting(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), fb(), IndexTupleSize(), MAXALIGN, and IndexTupleData::t_tid.
Referenced by _bt_bottomupdel_pass(), _bt_dedup_pass(), _bt_load(), and btree_xlog_dedup().
|
extern |
Definition at line 433 of file nbtdedup.c.
References Assert, BTreeTupleGetNPosting(), BTreeTupleGetPosting(), BTreeTupleGetPostingOffset(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), fb(), IndexTupleSize(), MAXALIGN, and IndexTupleData::t_tid.
Referenced by _bt_bottomupdel_pass(), _bt_dedup_pass(), _bt_load(), and btree_xlog_dedup().
|
extern |
Definition at line 1512 of file nbtpage.c.
References _bt_delitems_cmp(), _bt_delitems_delete(), Assert, BTreeTupleGetHeapTID(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetNPosting(), BTreeTupleGetPostingN(), BTreeTupleIsPosting(), buf, BufferGetPage(), fb(), i, TM_IndexStatus::idxoffnum, InvalidOffsetNumber, InvalidTransactionId, ItemPointerCompare(), ItemPointerEquals(), MaxIndexTuplesPerPage, OffsetNumberIsValid, PageGetItem(), PageGetItemId(), palloc(), pfree(), qsort, RelationIsAccessibleInLogicalDecoding, IndexTupleData::t_tid, table_index_delete_tuples(), and XLogStandbyInfoActive.
Referenced by _bt_bottomupdel_pass(), and _bt_simpledel_pass().
|
extern |
Definition at line 1155 of file nbtpage.c.
References _bt_delitems_update(), Assert, BTPageGetOpaque, BTPageOpaqueData::btpo_cycleid, BTPageOpaqueData::btpo_flags, buf, BufferGetBlockNumber(), BufferGetPage(), elog, END_CRIT_SECTION, fb(), i, IndexTupleSize(), BTVacuumPostingData::itup, MarkBufferDirty(), MAXALIGN, MaxIndexTuplesPerPage, xl_btree_vacuum::ndeleted, PageIndexMultiDelete(), PageIndexTupleOverwrite(), PageSetLSN(), PANIC, pfree(), REGBUF_STANDARD, RelationGetRelationName, RelationNeedsWAL, SizeOfBtreeVacuum, START_CRIT_SECTION, XLOG_BTREE_VACUUM, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by btvacuumpage().
|
extern |
Definition at line 104 of file nbtinsert.c.
References _bt_check_unique(), _bt_findinsertloc(), _bt_freestack(), _bt_insertonpg(), _bt_mkscankey(), _bt_relbuf(), _bt_search_insert(), BTScanInsertData::anynullkeys, Assert, BufferGetBlockNumber(), CheckForSerializableConflictIn(), fb(), BTScanInsertData::heapkeyspace, IndexTupleSize(), InvalidBuffer, MAXALIGN, pfree(), BTScanInsertData::scantid, SpeculativeInsertionWait(), IndexTupleData::t_tid, TransactionIdIsValid, UNIQUE_CHECK_EXISTING, UNIQUE_CHECK_NO, unlikely, XactLockTableWait(), and XLTW_InsertIndex.
Referenced by btinsert().
Definition at line 526 of file nbtutils.c.
References btvacinfo, LockRelId::dbId, fb(), i, LockInfoData::lockRelId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), BTVacInfo::num_vacuums, RelationData::rd_lockInfo, LockRelId::relId, and BTVacInfo::vacuums.
Referenced by _bt_end_vacuum_callback(), and btbulkdelete().
Definition at line 554 of file nbtutils.c.
References _bt_end_vacuum(), arg, and DatumGetPointer().
Referenced by btbulkdelete().
|
extern |
Definition at line 130 of file nbtsplitloc.c.
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, fb(), i, IndexRelationGetNumberOfKeyAttributes, ItemIdGetLength, MAXALIGN, OffsetNumberNext, P_FIRSTDATAKEY, P_HIKEY, P_ISLEAF, P_RIGHTMOST, PageGetExactFreeSpace(), PageGetItemId(), PageGetMaxOffsetNumber(), PageGetPageSize(), palloc_array, pfree(), RelationGetRelationName, SizeOfPageHeaderData, SPLIT_DEFAULT, SPLIT_MANY_DUPLICATES, and SPLIT_SINGLE_VALUE.
Referenced by _bt_split().
Definition at line 2256 of file nbtinsert.c.
References _bt_getbuf(), _bt_insert_parent(), _bt_relbuf(), Assert, BT_WRITE, BTPageGetMeta, BTPageGetOpaque, BTREE_METAPAGE, BufferGetBlockNumber(), BufferGetPage(), DEBUG1, elog, fb(), INJECTION_POINT, P_INCOMPLETE_SPLIT, P_LEFTMOST, and P_RIGHTMOST.
Referenced by _bt_getstackbuf(), _bt_moveright(), and _bt_stepright().
|
extern |
Definition at line 878 of file nbtsearch.c.
References _bt_binsrch(), _bt_endpoint(), _bt_freestack(), _bt_metaversion(), _bt_parallel_done(), _bt_parallel_seize(), _bt_preprocess_keys(), _bt_readfirstpage(), _bt_readnextpage(), _bt_returnitem(), _bt_search(), _bt_start_array_keys(), BTScanInsertData::allequalimage, BTScanInsertData::anynullkeys, Assert, BTScanInsertData::backward, BT_READ, BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, BTORDER_PROC, BTScanPosIsValid, BufferIsValid(), cur, DatumGetPointer(), elog, ERROR, fb(), get_opfamily_proc(), BTScanInsertData::heapkeyspace, BTArrayKeyInfo::high_compare, i, index_getprocinfo(), INDEX_MAX_KEYS, IndexScanDescData::indexRelation, IndexScanDescData::instrument, InvalidBlockNumber, InvalidOid, InvalidStrategy, IsolationIsSerializable, BTScanInsertData::keysz, BTArrayKeyInfo::low_compare, BTScanInsertData::nextkey, IndexScanInstrumentation::nsearches, BTArrayKeyInfo::null_elem, IndexScanDescData::opaque, P_NONE, IndexScanDescData::parallel_scan, pgstat_count_index_scan, PredicateLockRelation(), RelationData::rd_opcintype, RelationData::rd_opfamily, RegProcedureIsValid, RelationGetRelationName, BTArrayKeyInfo::scan_key, ScanDirectionIsBackward, ScanDirectionIsForward, ScanKeyEntryInitialize(), ScanKeyEntryInitializeWithInfo(), BTScanInsertData::scankeys, BTScanInsertData::scantid, SK_BT_DESC, SK_BT_MAXVAL, SK_BT_MINVAL, SK_BT_NEXT, SK_BT_NULLS_FIRST, SK_BT_PRIOR, SK_BT_REQBKWD, SK_BT_REQFWD, SK_BT_SKIP, ScanKeyData::sk_flags, SK_ISNULL, SK_ROW_END, SK_ROW_HEADER, SK_ROW_MEMBER, SK_SEARCHNOTNULL, and IndexScanDescData::xs_snapshot.
Referenced by btgetbitmap(), and btgettuple().
|
extern |
Definition at line 862 of file nbtdedup.c.
References Assert, BTreeTupleGetPosting(), BTreeTupleGetPostingOffset(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), BTreeTupleSetPosting(), fb(), INDEX_SIZE_MASK, IndexTupleSize(), ItemPointerCopy(), ItemPointerIsValid(), MAXALIGN, palloc0(), PG_UINT16_MAX, IndexTupleData::t_info, and IndexTupleData::t_tid.
Referenced by _bt_dedup_finish_pending(), _bt_sort_dedup_finish_pending(), and bt_posting_plain_tuple().
Definition at line 151 of file nbtutils.c.
References BTStackData::bts_parent, fb(), and pfree().
Referenced by _bt_doinsert(), _bt_first(), and bt_rootdescend().
Definition at line 2092 of file nbtsearch.c.
References _bt_getroot(), _bt_gettrueroot(), _bt_relandgetbuf(), BT_READ, BTPageGetOpaque, BTPageOpaqueData::btpo_level, BTPageOpaqueData::btpo_next, BTreeTupleGetDownLink(), buf, BufferGetPage(), BufferIsValid(), elog, ereport, errcode(), errmsg_internal(), ERROR, fb(), InvalidBuffer, P_FIRSTDATAKEY, P_IGNORE, P_NONE, P_RIGHTMOST, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), PANIC, and RelationGetRelationName.
Referenced by _bt_endpoint(), and _bt_insert_parent().
|
extern |
Definition at line 846 of file nbtpage.c.
References _bt_checkpage(), _bt_lockbuf(), Assert, BlockNumberIsValid(), buf, and ReadBuffer().
Referenced by _bt_finish_split(), _bt_getroot(), _bt_getrootheight(), _bt_getstackbuf(), _bt_gettrueroot(), _bt_insertonpg(), _bt_killitems(), _bt_leftsib_splitflag(), _bt_lock_and_validate_left(), _bt_metaversion(), _bt_moveright(), _bt_newlevel(), _bt_pagedel(), _bt_readnextpage(), _bt_rightsib_halfdeadflag(), _bt_set_cleanup_info(), _bt_split(), _bt_unlink_halfdead_page(), and _bt_vacuum_needs_cleanup().
Definition at line 345 of file nbtpage.c.
References _bt_allocbuf(), _bt_getbuf(), _bt_getmeta(), _bt_getroot(), _bt_lockbuf(), _bt_relandgetbuf(), _bt_relbuf(), _bt_unlockbuf(), _bt_upgrademetapage(), xl_btree_metadata::allequalimage, Assert, BT_READ, BT_WRITE, BTP_LEAF, BTP_ROOT, BTPageGetOpaque, 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, fb(), InvalidBuffer, xl_btree_metadata::last_cleanup_num_delpages, xl_btree_metadata::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, SizeOfBtreeNewroot, START_CRIT_SECTION, xl_btree_metadata::version, XLOG_BTREE_NEWROOT, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by _bt_get_endpoint(), _bt_getroot(), and _bt_search().
Definition at line 676 of file nbtpage.c.
References _bt_getbuf(), _bt_getmeta(), _bt_relbuf(), Assert, BT_READ, BTREE_MAGIC, BTREE_METAPAGE, BTREE_MIN_VERSION, BTREE_NOVAC_VERSION, BTREE_VERSION, fb(), MemoryContextAlloc(), P_NONE, RelationData::rd_amcache, and RelationData::rd_indexcxt.
Referenced by _bt_insertonpg(), and btgettreeheight().
|
extern |
Definition at line 2335 of file nbtinsert.c.
References _bt_finish_split(), _bt_getbuf(), _bt_relbuf(), Assert, BT_WRITE, BTPageGetOpaque, BTPageOpaqueData::btpo_next, BTreeTupleGetDownLink(), BTStackData::bts_blkno, BTStackData::bts_offset, BTStackData::bts_parent, buf, BufferGetPage(), fb(), InvalidBuffer, InvalidOffsetNumber, OffsetNumberNext, OffsetNumberPrev, P_FIRSTDATAKEY, P_IGNORE, P_INCOMPLETE_SPLIT, P_RIGHTMOST, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), and start.
Referenced by _bt_insert_parent(), and _bt_lock_subtree_parent().
Definition at line 581 of file nbtpage.c.
References _bt_getbuf(), _bt_relandgetbuf(), _bt_relbuf(), BT_READ, BTPageGetMeta, BTPageGetOpaque, BTREE_MAGIC, BTREE_METAPAGE, BTREE_MIN_VERSION, BTREE_VERSION, BufferGetPage(), elog, ereport, errcode(), errmsg(), ERROR, fb(), InvalidBuffer, P_IGNORE, P_ISMETA, P_NONE, P_RIGHTMOST, pfree(), RelationData::rd_amcache, and RelationGetRelationName.
Referenced by _bt_get_endpoint().
|
extern |
Definition at line 68 of file nbtpage.c.
References _bt_pageinit(), BTP_META, BTPageGetMeta, BTPageGetOpaque, BTREE_MAGIC, BTREE_VERSION, and fb().
Referenced by _bt_uppershutdown(), and btbuildempty().
|
extern |
Definition at line 917 of file nbtutils.c.
References attnum, datum_image_eq(), fb(), index_getattr(), IndexRelationGetNumberOfKeyAttributes, RelationGetDescr, and TupleDescCompactAttr().
Referenced by _bt_afternewitemoff(), _bt_bottomupdel_pass(), _bt_dedup_pass(), _bt_do_singleval(), _bt_keep_natts(), _bt_load(), _bt_set_startikey(), _bt_split_penalty(), and _bt_strategy().
|
extern |
Definition at line 205 of file nbtutils.c.
References _bt_compare_int(), _bt_getbuf(), _bt_lockbuf(), _bt_relbuf(), _bt_unlockbuf(), Assert, BT_READ, BTP_HAS_GARBAGE, BTPageGetOpaque, BTPageOpaqueData::btpo_flags, BTreeTupleGetNPosting(), BTreeTupleGetPostingN(), BTreeTupleIsPosting(), BTScanPosIsPinned, BTScanPosIsValid, buf, BufferGetLSNAtomic(), BufferGetPage(), fb(), IndexScanDescData::heapRelation, i, BTScanPosItem::indexOffset, IndexScanDescData::indexRelation, ItemIdIsDead, ItemIdMarkDead, ItemPointerEquals(), j, MarkBufferDirtyHint(), OffsetNumberNext, IndexScanDescData::opaque, P_FIRSTDATAKEY, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), qsort, qunique(), and RelationNeedsWAL.
Referenced by _bt_steppage(), btendscan(), btrescan(), and btrestrpos().
Definition at line 1040 of file nbtpage.c.
References buf, BufferGetPage(), fb(), LockBuffer(), RelationUsesLocalBuffers, and VALGRIND_MAKE_MEM_DEFINED.
Referenced by _bt_getbuf(), _bt_getroot(), _bt_killitems(), _bt_moveright(), _bt_pagedel(), _bt_relandgetbuf(), _bt_search(), _bt_set_cleanup_info(), _bt_unlink_halfdead_page(), and btvacuumpage().
Definition at line 740 of file nbtpage.c.
References _bt_getbuf(), _bt_getmeta(), _bt_relbuf(), Assert, BT_READ, BTREE_MAGIC, BTREE_METAPAGE, BTREE_MIN_VERSION, BTREE_NOVAC_VERSION, BTREE_VERSION, fb(), MemoryContextAlloc(), P_NONE, RelationData::rd_amcache, and RelationData::rd_indexcxt.
Referenced by _bt_first(), _bt_mkscankey(), and bt_index_check_callback().
|
extern |
Definition at line 59 of file nbtutils.c.
References _bt_metaversion(), arg, Assert, BTORDER_PROC, BTreeTupleGetHeapTID(), BTreeTupleGetNAtts, fb(), i, index_getattr(), index_getprocinfo(), IndexRelationGetNumberOfAttributes, IndexRelationGetNumberOfKeyAttributes, InvalidOid, InvalidStrategy, Min, palloc(), RelationData::rd_indcollation, RelationData::rd_index, RelationData::rd_indoption, RelationGetDescr, ScanKeyEntryInitializeWithInfo(), SK_BT_INDOPTION_SHIFT, and SK_ISNULL.
Referenced by _bt_doinsert(), _bt_leafbuild(), _bt_pagedel(), bt_mkscankey_pivotsearch(), bt_rootdescend(), tuplesort_begin_cluster(), and tuplesort_begin_index_btree().
|
extern |
Definition at line 1586 of file nbtsearch.c.
References _bt_returnitem(), _bt_steppage(), Assert, BTScanPosIsValid, fb(), IndexScanDescData::opaque, and ScanDirectionIsForward.
Referenced by btgetbitmap(), and btgettuple().
|
extern |
Definition at line 1801 of file nbtpage.c.
References _bt_getbuf(), _bt_leftsib_splitflag(), _bt_lockbuf(), _bt_mark_page_halfdead(), _bt_mkscankey(), _bt_relbuf(), _bt_search(), _bt_unlink_halfdead_page(), _bt_unlockbuf(), Assert, BTScanInsertData::backward, BT_READ, BT_WRITE, BTPageGetOpaque, BTPageOpaqueData::btpo_next, BTPageOpaqueData::btpo_prev, BufferGetBlockNumber(), BufferGetPage(), CHECK_FOR_INTERRUPTS, CopyIndexTuple(), ereport, errcode(), errhint(), errmsg(), errmsg_internal(), fb(), INJECTION_POINT, LOG, BTScanInsertData::nextkey, P_FIRSTDATAKEY, P_HIKEY, P_IGNORE, P_INCOMPLETE_SPLIT, P_ISDELETED, P_ISHALFDEAD, P_ISLEAF, P_ISROOT, P_RIGHTMOST, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), RelationGetRelationName, and ReleaseBuffer().
Referenced by btvacuumpage().
Definition at line 1130 of file nbtpage.c.
References PageInit().
Referenced by _bt_allocbuf(), _bt_blnewpage(), _bt_initmetapage(), _bt_restore_meta(), _bt_split(), btree_xlog_mark_page_halfdead(), btree_xlog_newroot(), btree_xlog_split(), and btree_xlog_unlink_page().
|
extern |
Definition at line 1741 of file nbtsort.c.
References _bt_parallel_scan_and_sort(), AccessExclusiveLock, Assert, debug_query_string, fb(), BTShared::heaprelid, index_close(), index_open(), BTShared::indexrelid, InstrEndParallelQuery(), InstrStartParallelQuery(), BTShared::isconcurrent, BTShared::isunique, log_btree_build_stats, maintenance_work_mem, MyProc, BTShared::nulls_not_distinct, palloc0_object, PARALLEL_KEY_BTREE_SHARED, PARALLEL_KEY_BUFFER_USAGE, PARALLEL_KEY_QUERY_TEXT, PARALLEL_KEY_TUPLESORT, PARALLEL_KEY_TUPLESORT_SPOOL2, PARALLEL_KEY_WAL_USAGE, ParallelWorkerNumber, pgstat_report_activity(), pgstat_report_query_id(), PROC_IN_SAFE_IC, BTShared::queryid, ResetUsage(), RowExclusiveLock, BTShared::scantuplesortstates, ShareLock, ShareUpdateExclusiveLock, shm_toc_lookup(), ShowUsage(), STATE_RUNNING, PGPROC::statusFlags, table_close(), table_open(), and tuplesort_attach_shared().
|
extern |
Definition at line 1041 of file nbtree.c.
References Assert, BTPARALLEL_DONE, BTPARALLEL_NEED_PRIMSCAN, BTScanPosIsValid, ConditionVariableBroadcast(), fb(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), OffsetToPointer, IndexScanDescData::opaque, IndexScanDescData::parallel_scan, and ParallelIndexScanDescData::ps_offset_am.
Referenced by _bt_endpoint(), _bt_first(), _bt_parallel_seize(), _bt_readnextpage(), and _bt_start_prim_scan().
|
extern |
Definition at line 1091 of file nbtree.c.
References _bt_parallel_serialize_arrays(), Assert, BTPARALLEL_IDLE, BTPARALLEL_NEED_PRIMSCAN, fb(), IndexScanDescData::indexRelation, InvalidBlockNumber, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), OffsetToPointer, IndexScanDescData::opaque, IndexScanDescData::parallel_scan, and ParallelIndexScanDescData::ps_offset_am.
Referenced by _bt_advance_array_keys(), and _bt_readpage().
|
extern |
Definition at line 1014 of file nbtree.c.
References Assert, BlockNumberIsValid(), BTPARALLEL_IDLE, ConditionVariableSignal(), fb(), LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), OffsetToPointer, IndexScanDescData::parallel_scan, and ParallelIndexScanDescData::ps_offset_am.
Referenced by _bt_readnextpage(), and _bt_readpage().
|
extern |
Definition at line 876 of file nbtree.c.
References _bt_parallel_done(), _bt_parallel_restore_arrays(), Assert, BTPARALLEL_ADVANCING, BTPARALLEL_DONE, BTPARALLEL_IDLE, BTPARALLEL_NEED_PRIMSCAN, BTScanPosInvalidate, ConditionVariableCancelSleep(), ConditionVariableSleep(), fb(), IndexScanDescData::indexRelation, InvalidBlockNumber, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), OffsetToPointer, IndexScanDescData::opaque, P_NONE, IndexScanDescData::parallel_scan, and ParallelIndexScanDescData::ps_offset_am.
Referenced by _bt_first(), and _bt_readnextpage().
|
extern |
Definition at line 3000 of file nbtpage.c.
References Assert, fb(), GetOldestNonRemovableTransactionId(), GlobalVisCheckRemovableFullXid(), i, IndexBulkDeleteResult::pages_free, IndexBulkDeleteResult::pages_newly_deleted, pfree(), pg_usleep(), and RecordFreeIndexPage().
Referenced by btvacuumscan().
|
extern |
Definition at line 2958 of file nbtpage.c.
References fb(), Max, MaxAllocSize, Min, palloc_array, and work_mem.
Referenced by btvacuumscan().
|
extern |
Definition at line 203 of file nbtpreprocesskeys.c.
References _bt_compare_scankey_args(), _bt_fix_scankey_strategy(), _bt_mark_scankey_required(), _bt_preprocess_array_keys(), _bt_preprocess_array_keys_final(), _bt_unmark_keys(), Assert, BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, BTMaxStrategyNumber, elog, ERROR, fb(), i, IndexScanDescData::indexRelation, j, IndexScanDescData::keyData, MemoryContextAlloc(), IndexScanDescData::numberOfKeys, OidIsValid, IndexScanDescData::opaque, RelationData::rd_indoption, repalloc(), BTArrayKeyInfo::scan_key, ScanKeyData::sk_attno, SK_BT_SKIP, ScanKeyData::sk_flags, SK_SEARCHARRAY, SK_SEARCHNULL, ScanKeyData::sk_strategy, and unlikely.
Referenced by _bt_first().
|
extern |
Definition at line 134 of file nbtreadpage.c.
References _bt_checkkeys(), _bt_parallel_primscan_schedule(), _bt_parallel_release(), _bt_saveitem(), _bt_savepostingitem(), _bt_scanbehind_checkkeys(), _bt_set_startikey(), _bt_setuppostingitems(), _bt_start_array_keys(), Assert, BTPageGetOpaque, BTPageOpaqueData::btpo_next, BTPageOpaqueData::btpo_prev, BTreeTupleGetNAtts, BTreeTupleGetNPosting(), BTreeTupleGetPostingN(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), BTScanPosIsPinned, BufferGetBlockNumber(), BufferGetPage(), BTReadPageState::continuescan, BTReadPageState::dir, fb(), BTReadPageState::finaltup, BTReadPageState::firstpage, BTReadPageState::forcenonrequired, i, IndexScanDescData::ignore_killed_tuples, IndexScanDescData::indexRelation, IndexRelationGetNumberOfAttributes, InvalidOffsetNumber, ItemIdIsDead, Max, BTReadPageState::maxoff, MaxTIDsPerBTreePage, Min, BTReadPageState::minoff, nitems, BTReadPageState::nskipadvances, BTReadPageState::offnum, OffsetNumberIsValid, OffsetNumberNext, OffsetNumberPrev, IndexScanDescData::opaque, P_FIRSTDATAKEY, P_HIKEY, P_IGNORE, P_LEFTMOST, P_RIGHTMOST, BTReadPageState::page, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), IndexScanDescData::parallel_scan, PredicateLockPage(), BTReadPageState::rechecks, ScanDirectionIsForward, BTReadPageState::skip, BTReadPageState::startikey, BTReadPageState::targetdistance, unlikely, and IndexScanDescData::xs_snapshot.
Referenced by _bt_readfirstpage(), and _bt_readnextpage().
|
extern |
Definition at line 1004 of file nbtpage.c.
References _bt_checkpage(), _bt_lockbuf(), _bt_unlockbuf(), Assert, BlockNumberIsValid(), buf, BufferIsValid(), fb(), and ReleaseAndReadBuffer().
Referenced by _bt_check_unique(), _bt_get_endpoint(), _bt_getroot(), _bt_gettrueroot(), _bt_lock_and_validate_left(), _bt_moveright(), _bt_search(), and _bt_stepright().
Definition at line 1024 of file nbtpage.c.
References _bt_unlockbuf(), buf, and ReleaseBuffer().
Referenced by _bt_allocbuf(), _bt_check_unique(), _bt_doinsert(), _bt_drop_lock_and_maybe_pin(), _bt_finish_split(), _bt_getroot(), _bt_getrootheight(), _bt_getstackbuf(), _bt_gettrueroot(), _bt_insert_parent(), _bt_insertonpg(), _bt_killitems(), _bt_leftsib_splitflag(), _bt_lock_and_validate_left(), _bt_lock_subtree_parent(), _bt_mark_page_halfdead(), _bt_metaversion(), _bt_moveright(), _bt_newlevel(), _bt_pagedel(), _bt_readnextpage(), _bt_rightsib_halfdeadflag(), _bt_search_insert(), _bt_set_cleanup_info(), _bt_split(), _bt_stepright(), _bt_unlink_halfdead_page(), _bt_vacuum_needs_cleanup(), bt_rootdescend(), btvacuumpage(), and pgstat_btree_page().
|
extern |
Definition at line 98 of file nbtsearch.c.
References _bt_binsrch(), _bt_getroot(), _bt_lockbuf(), _bt_moveright(), _bt_relandgetbuf(), _bt_unlockbuf(), Assert, BT_READ, BT_WRITE, BTPageGetOpaque, BTPageOpaqueData::btpo_level, BTreeTupleGetDownLink(), BTreeTupleIsPivot(), BufferGetBlockNumber(), BufferGetPage(), BufferIsValid(), fb(), P_ISLEAF, PageGetItem(), PageGetItemId(), and palloc_object.
Referenced by _bt_first(), _bt_pagedel(), _bt_search_insert(), and bt_rootdescend().
|
extern |
Definition at line 233 of file nbtpage.c.
References _bt_getbuf(), _bt_lockbuf(), _bt_relbuf(), _bt_unlockbuf(), _bt_upgrademetapage(), xl_btree_metadata::allequalimage, Assert, BT_READ, BT_WRITE, BTPageGetMeta, BTREE_METAPAGE, BTREE_NOVAC_VERSION, BufferGetPage(), END_CRIT_SECTION, xl_btree_metadata::fastlevel, xl_btree_metadata::fastroot, fb(), xl_btree_metadata::last_cleanup_num_delpages, xl_btree_metadata::level, MarkBufferDirty(), PageSetLSN(), REGBUF_STANDARD, REGBUF_WILL_INIT, RelationNeedsWAL, xl_btree_metadata::root, START_CRIT_SECTION, xl_btree_metadata::version, XLOG_BTREE_META_CLEANUP, XLogBeginInsert(), XLogInsert(), XLogRegisterBufData(), and XLogRegisterBuffer().
Referenced by btvacuumcleanup().
|
extern |
Definition at line 537 of file nbtreadpage.c.
References _bt_array_set_low_or_high(), Assert, fb(), i, IndexScanDescData::indexRelation, IndexScanDescData::opaque, BTArrayKeyInfo::scan_key, ScanDirectionIsForward, and SK_SEARCHARRAY.
Referenced by _bt_advance_array_keys_increment(), _bt_first(), _bt_readpage(), and btrestrpos().
Definition at line 469 of file nbtutils.c.
References btvacinfo, BTVacInfo::cycle_ctr, LockRelId::dbId, elog, ERROR, fb(), i, LockInfoData::lockRelId, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), MAX_BT_CYCLE_ID, BTVacInfo::max_vacuums, BTVacInfo::num_vacuums, RelationData::rd_lockInfo, RelationGetRelationName, BTOneVacInfo::relid, LockRelId::relId, and BTVacInfo::vacuums.
Referenced by btbulkdelete().
|
extern |
Definition at line 1020 of file nbtdedup.c.
References Assert, BTreeTupleGetHeapTID(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetNPosting(), BTreeTupleGetPostingN(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), CopyIndexTuple(), elog, ERROR, fb(), ItemPointerCompare(), ItemPointerCopy(), and IndexTupleData::t_tid.
Referenced by _bt_insertonpg(), btree_xlog_insert(), and btree_xlog_split().
|
extern |
Definition at line 698 of file nbtutils.c.
References _bt_keep_natts(), Assert, BTreeTupleGetHeapTID(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetPostingOffset(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), BTreeTupleSetNAtts(), fb(), index_truncate_tuple(), IndexRelationGetNumberOfAttributes, IndexRelationGetNumberOfKeyAttributes, IndexTupleSize(), ItemPointerCompare(), ItemPointerCopy(), ItemPointerGetOffsetNumber(), ItemPointerSetOffsetNumber(), MAXALIGN, Min, OffsetNumberPrev, palloc0(), pfree(), and RelationGetDescr.
Referenced by _bt_buildadd(), and _bt_split().
Definition at line 1071 of file nbtpage.c.
References buf, BUFFER_LOCK_UNLOCK, BufferGetPage(), fb(), LockBuffer(), RelationUsesLocalBuffers, VALGRIND_CHECK_MEM_IS_DEFINED, and VALGRIND_MAKE_MEM_NOACCESS.
Referenced by _bt_drop_lock_and_maybe_pin(), _bt_getroot(), _bt_killitems(), _bt_moveright(), _bt_pagedel(), _bt_readfirstpage(), _bt_relandgetbuf(), _bt_relbuf(), _bt_search(), _bt_set_cleanup_info(), and _bt_unlink_halfdead_page().
|
extern |
Definition at line 922 of file nbtdedup.c.
References Assert, BTreeTupleGetNPosting(), BTreeTupleGetPosting(), BTreeTupleGetPostingN(), BTreeTupleGetPostingOffset(), BTreeTupleSetPosting(), fb(), i, INDEX_SIZE_MASK, ItemPointerIsValid(), MAXALIGN, palloc0(), IndexTupleData::t_info, and IndexTupleData::t_tid.
Referenced by _bt_delitems_update(), and btree_xlog_updates().
Definition at line 1110 of file nbtpage.c.
References buf, BUFFER_LOCK_UNLOCK, BufferGetPage(), fb(), LockBuffer(), LockBufferForCleanup(), and VALGRIND_CHECK_MEM_IS_DEFINED.
Referenced by btvacuumpage().
Definition at line 108 of file nbtpage.c.
References Assert, BTP_META, BTPageGetMeta, BTPageGetOpaque, BTREE_MIN_VERSION, BTREE_NOVAC_VERSION, fb(), and PG_USED_FOR_ASSERTS_ONLY.
Referenced by _bt_getroot(), _bt_insertonpg(), _bt_newlevel(), _bt_set_cleanup_info(), and _bt_unlink_halfdead_page().
Definition at line 435 of file nbtutils.c.
References btvacinfo, BTOneVacInfo::cycleid, LockRelId::dbId, fb(), i, LockInfoData::lockRelId, LW_SHARED, LWLockAcquire(), LWLockRelease(), BTVacInfo::num_vacuums, RelationData::rd_lockInfo, LockRelId::relId, and BTVacInfo::vacuums.
Referenced by _bt_split().
Definition at line 180 of file nbtpage.c.
References _bt_getbuf(), _bt_relbuf(), BT_READ, BTPageGetMeta, BTREE_METAPAGE, BTREE_NOVAC_VERSION, BufferGetPage(), fb(), and RelationGetNumberOfBlocks.
Referenced by btvacuumcleanup().
Definition at line 288 of file nbtvalidate.c.
References BTORDER_PROC, CommandCounterIncrement(), fb(), functions, get_opclass_input_type(), InvalidOid, OpFamilyMember::is_func, OpFamilyMember::lefttype, lfirst, list_concat_copy(), OpFamilyMember::number, OidIsValid, opclass_for_family_datatype(), OpFamilyMember::ref_is_family, OpFamilyMember::ref_is_hard, OpFamilyMember::refobjid, and OpFamilyMember::righttype.
Referenced by bthandler().
|
extern |
Definition at line 337 of file nbtree.c.
References Assert, BTScanPosInvalidate, fb(), IndexScanDescData::numberOfKeys, IndexScanDescData::opaque, palloc(), palloc_object, RelationGetDescr, RelationGetIndexScan(), and IndexScanDescData::xs_itupdesc.
Referenced by bthandler().
|
extern |
Definition at line 296 of file nbtsort.c.
References _bt_end_parallel(), _bt_leafbuild(), _bt_spooldestroy(), _bt_spools_heapscan(), elog, ERROR, fb(), IndexBuildResult::heap_tuples, IndexInfo::ii_NullsNotDistinct, IndexInfo::ii_Unique, IndexBuildResult::index_tuples, log_btree_build_stats, palloc_object, RelationGetNumberOfBlocks, RelationGetRelationName, ResetUsage(), and ShowUsage().
Referenced by bthandler().
Definition at line 181 of file nbtree.c.
References _bt_allequalimage(), _bt_initmetapage(), BTREE_METAPAGE, fb(), INIT_FORKNUM, P_NONE, smgr_bulk_finish(), smgr_bulk_get_buf(), smgr_bulk_start_rel(), and smgr_bulk_write().
Referenced by bthandler().
Definition at line 650 of file nbtutils.c.
References fb(), PROGRESS_BTREE_PHASE_INDEXBUILD_TABLESCAN, PROGRESS_BTREE_PHASE_LEAF_LOAD, PROGRESS_BTREE_PHASE_PERFORMSORT_1, PROGRESS_BTREE_PHASE_PERFORMSORT_2, and PROGRESS_CREATEIDX_SUBPHASE_INITIALIZE.
Referenced by bthandler().
|
extern |
Definition at line 1125 of file nbtree.c.
References _bt_end_vacuum(), _bt_end_vacuum_callback(), _bt_start_vacuum(), btvacuumscan(), callback(), fb(), IndexVacuumInfo::index, palloc0_object, PG_END_ENSURE_ERROR_CLEANUP, PG_ENSURE_ERROR_CLEANUP, and PointerGetDatum().
Referenced by bthandler().
|
extern |
Definition at line 461 of file nbtree.c.
References _bt_killitems(), BTScanPosIsValid, BTScanPosUnpinIfPinned, fb(), MemoryContextDelete(), IndexScanDescData::opaque, and pfree().
Referenced by bthandler().
Definition at line 581 of file nbtree.c.
References add_size(), CompactAttribute::attbyval, CompactAttribute::attlen, attnum, BTMaxItemSize, BTParallelScanDescData::btps_arrElems, datumEstimateSpace(), fb(), IndexRelationGetNumberOfKeyAttributes, RelationData::rd_att, and TupleDescCompactAttr().
Referenced by bthandler().
|
extern |
Definition at line 289 of file nbtree.c.
References _bt_first(), _bt_next(), _bt_start_prim_scan(), Assert, fb(), ForwardScanDirection, IndexScanDescData::heapRelation, IndexScanDescData::opaque, tbm_add_tuples(), and IndexScanDescData::xs_heaptid.
Referenced by bthandler().
Definition at line 1814 of file nbtree.c.
References _bt_getrootheight().
Referenced by bthandler().
|
extern |
Definition at line 228 of file nbtree.c.
References _bt_first(), _bt_next(), _bt_start_prim_scan(), Assert, BTScanPosIsValid, fb(), IndexScanDescData::heapRelation, IndexScanDescData::kill_prior_tuple, MaxTIDsPerBTreePage, IndexScanDescData::opaque, palloc_array, and IndexScanDescData::xs_recheck.
Referenced by bthandler().
Definition at line 817 of file nbtree.c.
References BTPARALLEL_NOT_INITIALIZED, ConditionVariableInit(), fb(), InvalidBlockNumber, and LWLockInitialize().
Referenced by bthandler().
|
extern |
Definition at line 204 of file nbtree.c.
References _bt_doinsert(), fb(), index_form_tuple(), pfree(), RelationGetDescr, IndexTupleData::t_tid, and values.
Referenced by bthandler().
|
extern |
Definition at line 497 of file nbtree.c.
References BTScanPosInvalidate, BTScanPosIsValid, BTScanPosUnpinIfPinned, fb(), and IndexScanDescData::opaque.
Referenced by bthandler().
Definition at line 604 of file nbtutils.c.
References build_reloptions(), fb(), fillfactor, lengthof, RELOPT_KIND_BTREE, RELOPT_TYPE_BOOL, RELOPT_TYPE_INT, RELOPT_TYPE_REAL, and validate().
Referenced by bthandler().
|
inlinestatic |
Definition at line 261 of file nbtree.h.
References Assert, BTPageGetOpaque, FirstNormalFullTransactionId, P_HAS_FULLXID, P_ISDELETED, PageGetContents(), PageIsNew(), and BTDeletedPageData::safexid.
Referenced by _bt_allocbuf(), BTPageIsRecyclable(), and GetBTPageStatistics().
Definition at line 292 of file nbtree.h.
References Assert, BTPageGetDeleteXid(), BTPageGetOpaque, fb(), GlobalVisCheckRemovableFullXid(), P_ISDELETED, and PageIsNew().
Referenced by _bt_allocbuf(), and btvacuumpage().
|
inlinestatic |
Definition at line 240 of file nbtree.h.
References BTP_DELETED, BTP_HAS_FULLXID, BTPageGetOpaque, BTPageOpaqueData::btpo_flags, fb(), MAXALIGN, PageGetContents(), PageHeaderData::pd_lower, PageHeaderData::pd_special, PageHeaderData::pd_upper, BTDeletedPageData::safexid, and SizeOfPageHeaderData.
Referenced by _bt_unlink_halfdead_page(), and btree_xlog_unlink_page().
|
extern |
Definition at line 833 of file nbtree.c.
References Assert, BTPARALLEL_NOT_INITIALIZED, fb(), InvalidBlockNumber, LW_EXCLUSIVE, LWLockAcquire(), LWLockRelease(), OffsetToPointer, IndexScanDescData::parallel_scan, and ParallelIndexScanDescData::ps_offset_am.
Referenced by bthandler().
|
extern |
Definition at line 627 of file nbtutils.c.
References AMPROP_RETURNABLE.
Referenced by bthandler().
Definition at line 576 of file nbtutils.c.
References Assert, BTreeShmemSize(), btvacinfo, BTVacInfo::cycle_ctr, fb(), IsUnderPostmaster, BTVacInfo::max_vacuums, MaxBackends, BTVacInfo::num_vacuums, and ShmemInitStruct().
Referenced by CreateOrAttachShmemStructs().
Definition at line 563 of file nbtutils.c.
References add_size(), fb(), MaxBackends, and mul_size().
Referenced by BTreeShmemInit(), and CalculateShmemSize().
|
inlinestatic |
Definition at line 557 of file nbtree.h.
References fb(), and ItemPointerGetBlockNumberNoCheck().
Referenced by _bt_get_endpoint(), _bt_getstackbuf(), _bt_mark_page_halfdead(), _bt_search(), _bt_unlink_halfdead_page(), bt_check_level_from_leftmost(), bt_child_check(), bt_child_highkey_check(), bt_downlink_missing_check(), and btree_xlog_mark_page_halfdead().
|
inlinestatic |
Definition at line 639 of file nbtree.h.
References BT_PIVOT_HEAP_TID_ATTR, BTreeTupleGetPosting(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), fb(), IndexTupleSize(), ItemPointerGetOffsetNumberNoCheck(), and IndexTupleData::t_tid.
Referenced by _bt_bottomupdel_finish_pending(), _bt_check_natts(), _bt_check_third_page(), _bt_compare(), _bt_delitems_delete_check(), _bt_mkscankey(), _bt_swap_posting(), _bt_truncate(), bt_entry_unique_check(), bt_page_print_tuples(), bt_target_page_check(), BTreeTupleGetHeapTIDCareful(), and BTreeTupleGetPointsToTID().
|
inlinestatic |
Definition at line 665 of file nbtree.h.
References Assert, BTreeTupleGetNPosting(), BTreeTupleGetPostingN(), BTreeTupleIsPivot(), BTreeTupleIsPosting(), fb(), and IndexTupleData::t_tid.
Referenced by _bt_bottomupdel_finish_pending(), _bt_compare(), _bt_delitems_delete_check(), _bt_swap_posting(), _bt_truncate(), and bt_target_page_check().
|
inlinestatic |
Definition at line 519 of file nbtree.h.
References Assert, BT_OFFSET_MASK, BTreeTupleIsPosting(), fb(), and ItemPointerGetOffsetNumberNoCheck().
Referenced by _bt_binsrch_posting(), _bt_bottomupdel_finish_pending(), _bt_check_unique(), _bt_deadblocks(), _bt_dedup_save_htid(), _bt_dedup_start_pending(), _bt_delitems_delete_check(), _bt_killitems(), _bt_readpage(), _bt_simpledel_pass(), _bt_swap_posting(), _bt_update_posting(), bt_entry_unique_check(), bt_page_print_tuples(), bt_target_page_check(), BTreeTupleGetMaxHeapTID(), btreevacuumposting(), and btvacuumpage().
|
inlinestatic |
Definition at line 538 of file nbtree.h.
References BTreeTupleGetPostingOffset(), and fb().
Referenced by _bt_dedup_save_htid(), _bt_dedup_start_pending(), _bt_form_posting(), _bt_update_posting(), bt_page_print_tuples(), BTreeTupleGetHeapTID(), BTreeTupleGetPostingN(), and btreevacuumposting().
|
inlinestatic |
Definition at line 545 of file nbtree.h.
References BTreeTupleGetPosting(), and fb().
Referenced by _bt_binsrch_posting(), _bt_bottomupdel_finish_pending(), _bt_check_unique(), _bt_deadblocks(), _bt_delitems_delete_check(), _bt_killitems(), _bt_readpage(), _bt_simpledel_pass(), _bt_swap_posting(), _bt_update_posting(), bt_entry_unique_check(), bt_posting_plain_tuple(), bt_target_page_check(), and BTreeTupleGetMaxHeapTID().
|
inlinestatic |
Definition at line 530 of file nbtree.h.
References Assert, BTreeTupleIsPosting(), fb(), and ItemPointerGetBlockNumberNoCheck().
Referenced by _bt_dedup_start_pending(), _bt_form_posting(), _bt_recsplitloc(), _bt_setuppostingitems(), _bt_sort_dedup_finish_pending(), _bt_truncate(), _bt_update_posting(), bt_page_print_tuples(), and BTreeTupleGetPosting().
|
inlinestatic |
Definition at line 621 of file nbtree.h.
References fb(), and ItemPointerGetBlockNumberNoCheck().
Referenced by _bt_unlink_halfdead_page(), and bt_downlink_missing_check().
|
inlinestatic |
Definition at line 481 of file nbtree.h.
References BT_IS_POSTING, INDEX_ALT_TID_MASK, ItemPointerGetOffsetNumberNoCheck(), IndexTupleData::t_info, and IndexTupleData::t_tid.
Referenced by _bt_check_compare(), _bt_check_natts(), _bt_check_rowcompare(), _bt_check_unique(), _bt_deadblocks(), _bt_dedup_save_htid(), _bt_dedup_start_pending(), _bt_form_posting(), _bt_readpage(), _bt_saveitem(), _bt_search(), _bt_swap_posting(), _bt_truncate(), bt_normalize_tuple(), bt_page_print_tuples(), BTreeTupleGetHeapTID(), BTreeTupleGetHeapTIDCareful(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetPointsToTID(), BTreeTupleSetNAtts(), BTreeTupleSetPosting(), and btvacuumpage().
|
inlinestatic |
Definition at line 493 of file nbtree.h.
References BT_IS_POSTING, INDEX_ALT_TID_MASK, ItemPointerGetOffsetNumberNoCheck(), IndexTupleData::t_info, and IndexTupleData::t_tid.
Referenced by _bt_afternewitemoff(), _bt_binsrch_posting(), _bt_bottomupdel_finish_pending(), _bt_check_natts(), _bt_check_unique(), _bt_compare(), _bt_deadblocks(), _bt_dedup_save_htid(), _bt_dedup_start_pending(), _bt_delitems_delete_check(), _bt_findsplitloc(), _bt_form_posting(), _bt_insertonpg(), _bt_killitems(), _bt_readpage(), _bt_recsplitloc(), _bt_saveitem(), _bt_setuppostingitems(), _bt_simpledel_pass(), _bt_split(), _bt_swap_posting(), _bt_truncate(), bt_entry_unique_check(), bt_normalize_tuple(), bt_page_print_tuples(), bt_posting_plain_tuple(), bt_target_page_check(), BTreeTupleGetHeapTID(), BTreeTupleGetMaxHeapTID(), BTreeTupleGetNPosting(), BTreeTupleGetPostingOffset(), and btvacuumpage().
|
inlinestatic |
Definition at line 563 of file nbtree.h.
References fb(), and ItemPointerSetBlockNumber().
Referenced by _bt_buildadd(), _bt_insert_parent(), _bt_mark_page_halfdead(), _bt_newlevel(), _bt_uppershutdown(), and btree_xlog_mark_page_halfdead().
|
inlinestatic |
Definition at line 596 of file nbtree.h.
References Assert, BT_PIVOT_HEAP_TID_ATTR, BT_STATUS_OFFSET_MASK, BTreeTupleIsPivot(), fb(), INDEX_ALT_TID_MASK, INDEX_MAX_KEYS, ItemPointerSetOffsetNumber(), IndexTupleData::t_info, and IndexTupleData::t_tid.
Referenced by _bt_buildadd(), _bt_newlevel(), _bt_pgaddtup(), _bt_sortaddtup(), _bt_truncate(), and BTreeTupleSetTopParent().
|
inlinestatic |
Definition at line 505 of file nbtree.h.
References Assert, BT_IS_POSTING, BT_STATUS_OFFSET_MASK, BTreeTupleIsPivot(), fb(), INDEX_ALT_TID_MASK, INDEX_SIZE_MASK, ItemPointerSetBlockNumber(), ItemPointerSetOffsetNumber(), MAXALIGN, IndexTupleData::t_info, and IndexTupleData::t_tid.
Referenced by _bt_form_posting(), and _bt_update_posting().
|
inlinestatic |
Definition at line 627 of file nbtree.h.
References BTreeTupleSetNAtts(), fb(), and ItemPointerSetBlockNumber().
Referenced by _bt_mark_page_halfdead(), _bt_unlink_halfdead_page(), btree_xlog_mark_page_halfdead(), and btree_xlog_unlink_page().
|
extern |
Definition at line 386 of file nbtree.c.
References _bt_killitems(), BTScanPosInvalidate, BTScanPosIsValid, BTScanPosUnpinIfPinned, fb(), IndexScanDescData::heapRelation, IndexScanDescData::indexRelation, IsMVCCSnapshot, IndexScanDescData::keyData, IndexScanDescData::numberOfKeys, IndexScanDescData::opaque, palloc(), RelationNeedsWAL, IndexScanDescData::xs_snapshot, and IndexScanDescData::xs_want_itup.
Referenced by bthandler().
|
extern |
Definition at line 523 of file nbtree.c.
References _bt_killitems(), _bt_start_array_keys(), BTScanPosInvalidate, BTScanPosIsPinned, BTScanPosIsValid, BTScanPosUnpinIfPinned, fb(), IncrBufferRefCount(), items, and IndexScanDescData::opaque.
Referenced by bthandler().
|
extern |
Definition at line 1840 of file nbtree.c.
References BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, COMPARE_EQ, COMPARE_GE, COMPARE_GT, COMPARE_LE, COMPARE_LT, and InvalidStrategy.
Referenced by bthandler().
|
extern |
Definition at line 1820 of file nbtree.c.
References BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTLessEqualStrategyNumber, BTLessStrategyNumber, COMPARE_EQ, COMPARE_GE, COMPARE_GT, COMPARE_INVALID, COMPARE_LE, and COMPARE_LT.
Referenced by bthandler().
|
extern |
Definition at line 1155 of file nbtree.c.
References _bt_set_cleanup_info(), _bt_vacuum_needs_cleanup(), IndexVacuumInfo::analyze_only, Assert, btvacuumscan(), IndexVacuumInfo::estimated_count, IndexBulkDeleteResult::estimated_count, fb(), IndexVacuumInfo::index, IndexVacuumInfo::num_heap_tuples, IndexBulkDeleteResult::num_index_tuples, IndexBulkDeleteResult::pages_deleted, IndexBulkDeleteResult::pages_free, and palloc0_object.
Referenced by bthandler().
Definition at line 40 of file nbtvalidate.c.
References BTEQUALIMAGE_PROC, BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTGreaterStrategyNumber, BTINRANGE_PROC, BTLessEqualStrategyNumber, BTLessStrategyNumber, BTMaxStrategyNumber, BTOPTIONS_PROC, BTORDER_PROC, BTSKIPSUPPORT_PROC, BTSORTSUPPORT_PROC, check_amop_signature(), check_amoptsproc_signature(), check_amproc_signature(), elog, ereport, errcode(), errmsg(), ERROR, fb(), format_operator(), format_procedure(), format_type_be(), get_opfamily_name(), GETSTRUCT(), HeapTupleIsValid, i, identify_opfamily_groups(), INFO, lfirst, list_append_unique_oid(), list_length(), NameStr, NIL, ObjectIdGetDatum(), OidIsValid, ReleaseCatCacheList(), ReleaseSysCache(), SearchSysCache1(), and SearchSysCacheList1.
Referenced by bthandler().
| StaticAssertDecl | ( | BT_OFFSET_MASK >= | INDEX_MAX_KEYS, |
| "BT_OFFSET_MASK can't fit INDEX_MAX_KEYS" | |||
| ) |