|
PostgreSQL Source Code git master
|
#include "access/amapi.h"#include "access/generic_xlog.h"#include "access/itup.h"#include "access/xlog.h"#include "fmgr.h"#include "nodes/pathnodes.h"

Go to the source code of this file.
Data Structures | |
| struct | BloomPageOpaqueData |
| struct | BloomOptions |
| struct | BloomMetaPageData |
| struct | BloomState |
| struct | BloomTuple |
| struct | BloomScanOpaqueData |
| #define BloomMetaBlockN (sizeof(FreeBlockNumberArray) / sizeof(BlockNumber)) |
| #define BloomPageGetData | ( | page | ) | ((BloomTuple *)PageGetContents(page)) |
Definition at line 149 of file bloom.h.
| #define BloomPageGetMaxOffset | ( | page | ) | (BloomPageGetOpaque(page)->maxoff) |
| #define BloomPageGetMeta | ( | page | ) | ((BloomMetaPageData *) PageGetContents(page)) |
| #define BloomPageGetNextTuple | ( | state, | |
| tuple | |||
| ) | ((BloomTuple *)((char *)(tuple) + (state)->sizeOfBloomTuple)) |
| #define BloomPageGetOpaque | ( | page | ) | ((BloomPageOpaque) PageGetSpecialPointer(page)) |
| #define BloomPageIsDeleted | ( | page | ) | ((BloomPageGetOpaque(page)->flags & BLOOM_DELETED) != 0) |
| #define BloomPageIsMeta | ( | page | ) | ((BloomPageGetOpaque(page)->flags & BLOOM_META) != 0) |
| #define BloomPageSetDeleted | ( | page | ) | (BloomPageGetOpaque(page)->flags |= BLOOM_DELETED) |
| #define BloomPageSetNonDeleted | ( | page | ) | (BloomPageGetOpaque(page)->flags &= ~BLOOM_DELETED) |
| #define DEFAULT_BLOOM_LENGTH (5 * SIGNWORDBITS) |
| #define MAX_BLOOM_BITS (MAX_BLOOM_LENGTH - 1) |
| #define MAX_BLOOM_LENGTH (256 * SIGNWORDBITS) |
| #define SIGNWORDBITS ((int) (BITS_PER_BYTE * sizeof(BloomSignatureWord))) |
| typedef BlockNumber FreeBlockNumberArray[MAXALIGN_DOWN(BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(BloomPageOpaqueData)) - MAXALIGN(sizeof(uint16) *2+sizeof(uint32)+sizeof(BloomOptions)))/sizeof(BlockNumber)] |
|
extern |
Definition at line 26 of file blscan.c.
References fb(), IndexScanDescData::indexRelation, initBloomState(), IndexScanDescData::opaque, palloc_object, and RelationGetIndexScan().
Referenced by blhandler().
|
extern |
Definition at line 122 of file blinsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, bloomBuildCallback(), BloomInitMetapage(), CurrentMemoryContext, elog, ERROR, fb(), flushCachedPage(), IndexBuildResult::heap_tuples, IndexBuildResult::index_tuples, initBloomState(), initCachedPage(), MAIN_FORKNUM, MemoryContextDelete(), palloc_object, RelationGetNumberOfBlocks, RelationGetRelationName, and table_index_build_scan().
Referenced by blhandler().
Definition at line 165 of file blinsert.c.
References BloomInitMetapage(), and INIT_FORKNUM.
Referenced by blhandler().
|
extern |
Definition at line 30 of file blvacuum.c.
References Assert, BLOOM_HEAD_BLKNO, BLOOM_METAPAGE_BLKNO, BloomMetaBlockN, BloomPageGetFreeSpace, BloomPageGetMaxOffset, BloomPageGetMeta, BloomPageGetNextTuple, BloomPageGetOpaque, BloomPageGetTuple, BloomPageIsDeleted, BloomPageSetDeleted, BUFFER_LOCK_EXCLUSIVE, callback(), fb(), FirstOffsetNumber, GenericXLogAbort(), GenericXLogFinish(), GenericXLogRegisterBuffer(), GenericXLogStart(), BloomTuple::heapPtr, IndexVacuumInfo::index, initBloomState(), LockBuffer(), MAIN_FORKNUM, OffsetNumberNext, PageIsNew(), palloc0_object, RBM_NORMAL, ReadBuffer(), ReadBufferExtended(), RelationGetNumberOfBlocks, IndexVacuumInfo::strategy, IndexBulkDeleteResult::tuples_removed, UnlockReleaseBuffer(), and vacuum_delay_point().
Referenced by blhandler().
|
extern |
Definition at line 22 of file blcost.c.
References fb(), genericcostestimate(), GenericCosts::indexCorrelation, IndexPath::indexinfo, GenericCosts::indexSelectivity, GenericCosts::indexStartupCost, GenericCosts::indexTotalCost, GenericCosts::numIndexPages, GenericCosts::numIndexTuples, and root.
Referenced by blhandler().
|
extern |
Definition at line 63 of file blscan.c.
References fb(), IndexScanDescData::opaque, and pfree().
Referenced by blhandler().
|
extern |
Definition at line 76 of file blscan.c.
References BAS_BULKREAD, BLOOM_HEAD_BLKNO, BloomPageGetMaxOffset, BloomPageGetTuple, BloomPageIsDeleted, BUFFER_LOCK_SHARE, BufferGetPage(), CHECK_FOR_INTERRUPTS, fb(), FreeAccessStrategy(), GetAccessStrategy(), BloomTuple::heapPtr, i, IndexScanDescData::indexRelation, IndexScanDescData::instrument, IndexScanDescData::keyData, LockBuffer(), MAIN_FORKNUM, IndexScanInstrumentation::nsearches, IndexScanDescData::numberOfKeys, IndexScanDescData::opaque, PageIsNew(), palloc0_array, pfree(), pgstat_count_index_scan, RBM_NORMAL, ReadBufferExtended(), RelationGetNumberOfBlocks, BloomTuple::sign, signValue(), SK_ISNULL, tbm_add_tuples(), and UnlockReleaseBuffer().
Referenced by blhandler().
|
extern |
Definition at line 175 of file blinsert.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, BLOOM_METAPAGE_BLKNO, BloomFormTuple(), BloomInitPage(), BloomNewBuffer(), BloomPageAddItem(), BloomPageGetMeta, BloomPageIsDeleted, BUFFER_LOCK_EXCLUSIVE, BUFFER_LOCK_SHARE, BUFFER_LOCK_UNLOCK, BufferGetBlockNumber(), BufferGetPage(), CurrentMemoryContext, elog, ERROR, fb(), GENERIC_XLOG_FULL_IMAGE, GenericXLogAbort(), GenericXLogFinish(), GenericXLogRegisterBuffer(), GenericXLogStart(), initBloomState(), InvalidBlockNumber, LockBuffer(), MemoryContextDelete(), MemoryContextSwitchTo(), PageIsNew(), ReadBuffer(), ReleaseBuffer(), UnlockReleaseBuffer(), and values.
Referenced by blhandler().
Definition at line 420 of file blutils.c.
References Assert, BLOOM_MAGICK_NUMBER, BLOOM_META, BloomInitPage(), BloomPageGetMeta, fb(), BloomMetaPageData::magickNumber, makeDefaultBloomOptions(), BloomMetaPageData::opts, and opts.
Referenced by BloomInitMetapage().
|
extern |
Definition at line 299 of file blutils.c.
References BloomTuple::heapPtr, i, palloc0(), BloomTuple::sign, signValue(), and values.
Referenced by blinsert(), and bloomBuildCallback().
|
extern |
Definition at line 452 of file blutils.c.
References Assert, BLOOM_METAPAGE_BLKNO, BloomFillMetapage(), BUFFER_LOCK_EXCLUSIVE, BufferGetBlockNumber(), fb(), GENERIC_XLOG_FULL_IMAGE, GenericXLogFinish(), GenericXLogRegisterBuffer(), GenericXLogStart(), LockBuffer(), P_NEW, RBM_NORMAL, ReadBufferExtended(), and UnlockReleaseBuffer().
Referenced by blbuild(), and blbuildempty().
Definition at line 405 of file blutils.c.
References BloomPageOpaqueData::bloom_page_id, BLOOM_PAGE_ID, BloomPageGetOpaque, fb(), BloomPageOpaqueData::flags, and PageInit().
Referenced by blinsert(), BloomFillMetapage(), and initCachedPage().
Definition at line 359 of file blutils.c.
References BloomPageIsDeleted, BMR_REL, BUFFER_LOCK_UNLOCK, BufferGetPage(), ConditionalLockBuffer(), EB_LOCK_FIRST, ExtendBufferedRel(), fb(), GetFreeIndexPage(), InvalidBlockNumber, LockBuffer(), MAIN_FORKNUM, PageIsNew(), ReadBuffer(), and ReleaseBuffer().
Referenced by blinsert(), and flushCachedPage().
|
extern |
Definition at line 324 of file blutils.c.
References Assert, BloomPageGetFreeSpace, BloomPageGetOpaque, BloomPageGetTuple, BloomPageIsDeleted, fb(), BloomPageOpaqueData::maxoff, and PageIsNew().
Referenced by blinsert(), and bloomBuildCallback().
Definition at line 481 of file blutils.c.
References bl_relopt_kind, bl_relopt_tab, BloomOptions::bloomLength, build_reloptions(), fb(), lengthof, SIGNWORDBITS, and validate().
Referenced by blhandler().
|
extern |
Definition at line 46 of file blscan.c.
References fb(), IndexScanDescData::keyData, IndexScanDescData::numberOfKeys, IndexScanDescData::opaque, and pfree().
Referenced by blhandler().
|
extern |
Definition at line 164 of file blvacuum.c.
References IndexVacuumInfo::analyze_only, BLOOM_HEAD_BLKNO, BloomPageGetMaxOffset, BloomPageIsDeleted, BUFFER_LOCK_SHARE, BufferGetPage(), fb(), IndexVacuumInfo::index, IndexFreeSpaceMapVacuum(), LockBuffer(), MAIN_FORKNUM, IndexBulkDeleteResult::num_index_tuples, IndexBulkDeleteResult::num_pages, PageIsNew(), IndexBulkDeleteResult::pages_free, palloc0_object, RBM_NORMAL, ReadBufferExtended(), RecordFreeIndexPage(), RelationGetNumberOfBlocks, IndexVacuumInfo::strategy, UnlockReleaseBuffer(), and vacuum_delay_point().
Referenced by blhandler().
Definition at line 30 of file blvalidate.c.
References BLOOM_HASH_PROC, BLOOM_NPROC, BLOOM_NSTRATEGIES, BLOOM_OPTIONS_PROC, check_amop_signature(), check_amoptsproc_signature(), check_amproc_signature(), elog, ereport, errcode(), errmsg(), ERROR, fb(), format_operator(), format_procedure(), get_opfamily_name(), GETSTRUCT(), HeapTupleIsValid, i, identify_opfamily_groups(), INFO, lfirst, NameStr, ObjectIdGetDatum(), OidIsValid, ReleaseCatCacheList(), ReleaseSysCache(), SearchSysCache1(), and SearchSysCacheList1.
Referenced by blhandler().
|
extern |
Definition at line 167 of file blutils.c.
References BLOOM_HASH_PROC, BLOOM_MAGICK_NUMBER, BLOOM_METAPAGE_BLKNO, BloomPageGetMeta, BloomPageIsMeta, BLOOMTUPLEHDRSZ, BUFFER_LOCK_SHARE, BufferGetPage(), CurrentMemoryContext, elog, ERROR, fb(), fmgr_info_copy(), i, index_getprocinfo(), LockBuffer(), BloomMetaPageData::magickNumber, MemoryContextAlloc(), BloomMetaPageData::opts, opts, ReadBuffer(), and UnlockReleaseBuffer().
Referenced by blbeginscan(), blbuild(), blbulkdelete(), and blinsert().
|
extern |
Definition at line 266 of file blutils.c.
References DatumGetInt32(), fb(), FunctionCall1Coll(), j, myRand(), mySrand(), SETBIT, sign, SIGNWORDBITS, and value.
Referenced by blgetbitmap(), and BloomFormTuple().