PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | BrinOpcInfo |
struct | BrinDesc |
Macros | |
#define | SizeofBrinOpcInfo(ncols) (offsetof(BrinOpcInfo, oi_typcache) + sizeof(TypeCacheEntry *) * ncols) |
#define | BRIN_PROCNUM_OPCINFO 1 |
#define | BRIN_PROCNUM_ADDVALUE 2 |
#define | BRIN_PROCNUM_CONSISTENT 3 |
#define | BRIN_PROCNUM_UNION 4 |
#define | BRIN_MANDATORY_NPROCS 4 |
#define | BRIN_PROCNUM_OPTIONS 5 /* optional */ |
#define | BRIN_FIRST_OPTIONAL_PROCNUM 11 |
#define | BRIN_LAST_OPTIONAL_PROCNUM 15 |
#define | BRIN_elog(args) ((void) 0) |
Typedefs | |
typedef struct BrinOpcInfo | BrinOpcInfo |
typedef struct BrinDesc | BrinDesc |
#define BRIN_elog | ( | args | ) | ((void) 0) |
Definition at line 85 of file brin_internal.h.
#define BRIN_FIRST_OPTIONAL_PROCNUM 11 |
Definition at line 77 of file brin_internal.h.
#define BRIN_LAST_OPTIONAL_PROCNUM 15 |
Definition at line 78 of file brin_internal.h.
#define BRIN_MANDATORY_NPROCS 4 |
Definition at line 74 of file brin_internal.h.
#define BRIN_PROCNUM_ADDVALUE 2 |
Definition at line 71 of file brin_internal.h.
#define BRIN_PROCNUM_CONSISTENT 3 |
Definition at line 72 of file brin_internal.h.
#define BRIN_PROCNUM_OPCINFO 1 |
Definition at line 70 of file brin_internal.h.
#define BRIN_PROCNUM_OPTIONS 5 /* optional */ |
Definition at line 75 of file brin_internal.h.
#define BRIN_PROCNUM_UNION 4 |
Definition at line 73 of file brin_internal.h.
#define SizeofBrinOpcInfo | ( | ncols | ) | (offsetof(BrinOpcInfo, oi_typcache) + sizeof(TypeCacheEntry *) * ncols) |
Definition at line 41 of file brin_internal.h.
typedef struct BrinOpcInfo BrinOpcInfo |
Definition at line 1573 of file brin.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, BrinDesc::bd_context, BrinDesc::bd_disktdesc, BrinDesc::bd_index, BrinDesc::bd_info, BrinDesc::bd_totalstored, BrinDesc::bd_tupdesc, BRIN_PROCNUM_OPCINFO, CurrentMemoryContext, DatumGetPointer(), FunctionCall1, index_getprocinfo(), MemoryContextSwitchTo(), TupleDescData::natts, BrinOpcInfo::oi_nstored, palloc(), palloc_array, pfree(), RelationGetDescr, and TupleDescAttr.
Referenced by brin_page_items(), brinbeginscan(), initialize_brin_buildstate(), and initialize_brin_insertstate().
void brin_free_desc | ( | BrinDesc * | bdesc | ) |
Definition at line 1628 of file brin.c.
References Assert, BrinDesc::bd_context, BrinDesc::bd_tupdesc, MemoryContextDelete(), and TupleDescData::tdrefcount.
Referenced by brin_page_items(), brinendscan(), and terminate_brin_buildstate().
IndexScanDesc brinbeginscan | ( | Relation | r, |
int | nkeys, | ||
int | norderbys | ||
) |
Definition at line 532 of file brin.c.
References BrinOpaque::bo_bdesc, BrinOpaque::bo_pagesPerRange, BrinOpaque::bo_rmAccess, brin_build_desc(), brinRevmapInitialize(), IndexScanDescData::opaque, palloc_object, and RelationGetIndexScan().
Referenced by brinhandler().
IndexBuildResult* brinbuild | ( | Relation | heap, |
Relation | index, | ||
struct IndexInfo * | indexInfo | ||
) |
Definition at line 1096 of file brin.c.
References _brin_begin_parallel(), _brin_end_parallel(), _brin_parallel_merge(), Assert, BMR_REL, BRIN_CURRENT_VERSION, brin_fill_empty_ranges(), BRIN_METAPAGE_BLKNO, brin_metapage_init(), brinbuildCallback(), BrinGetPagesPerRange, brinRevmapInitialize(), brinRevmapTerminate(), BufferGetBlockNumber(), BufferGetPage(), EB_LOCK_FIRST, EB_SKIP_EXTENSION_LOCK, elog, ERROR, ExtendBufferedRel(), form_and_insert_tuple(), IndexBuildResult::heap_tuples, IndexInfo::ii_Concurrent, IndexInfo::ii_ParallelWorkers, IndexBuildResult::index_tuples, initialize_brin_buildstate(), SortCoordinateData::isWorker, MAIN_FORKNUM, maintenance_work_mem, MarkBufferDirty(), SortCoordinateData::nParticipants, PageSetLSN(), xl_brin_createidx::pagesPerRange, palloc0(), palloc_object, REGBUF_STANDARD, REGBUF_WILL_INIT, RelationGetNumberOfBlocks, RelationGetRelationName, RelationNeedsWAL, SortCoordinateData::sharedsort, SizeOfBrinCreateIdx, table_index_build_scan(), terminate_brin_buildstate(), tuplesort_begin_index_brin(), TUPLESORT_NONE, UnlockReleaseBuffer(), xl_brin_createidx::version, XLOG_BRIN_CREATE_INDEX, XLogBeginInsert(), XLogInsert(), XLogRegisterBuffer(), and XLogRegisterData().
Referenced by brinhandler().
void brinbuildempty | ( | Relation | index | ) |
Definition at line 1265 of file brin.c.
References BMR_REL, BRIN_CURRENT_VERSION, brin_metapage_init(), BrinGetPagesPerRange, BufferGetPage(), EB_LOCK_FIRST, EB_SKIP_EXTENSION_LOCK, END_CRIT_SECTION, ExtendBufferedRel(), INIT_FORKNUM, log_newpage_buffer(), MarkBufferDirty(), START_CRIT_SECTION, and UnlockReleaseBuffer().
Referenced by brinhandler().
IndexBulkDeleteResult* brinbulkdelete | ( | IndexVacuumInfo * | info, |
IndexBulkDeleteResult * | stats, | ||
IndexBulkDeleteCallback | callback, | ||
void * | callback_state | ||
) |
Definition at line 1294 of file brin.c.
References palloc0_object.
Referenced by brinhandler().
void brinendscan | ( | IndexScanDesc | scan | ) |
Definition at line 969 of file brin.c.
References BrinOpaque::bo_bdesc, BrinOpaque::bo_rmAccess, brin_free_desc(), brinRevmapTerminate(), IndexScanDescData::opaque, and pfree().
Referenced by brinhandler().
int64 bringetbitmap | ( | IndexScanDesc | scan, |
TIDBitmap * | tbm | ||
) |
Definition at line 560 of file brin.c.
References AccessShareLock, addrange(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, BrinDesc::bd_info, BrinDesc::bd_tupdesc, BrinOpaque::bo_bdesc, BrinOpaque::bo_pagesPerRange, BrinOpaque::bo_rmAccess, brin_copy_tuple(), brin_deform_tuple(), brin_new_memtuple(), BRIN_PROCNUM_CONSISTENT, brinGetTupleForHeapBlock(), BrinMemTuple::bt_columns, BrinMemTuple::bt_empty_range, BrinMemTuple::bt_placeholder, buf, BUFFER_LOCK_SHARE, BUFFER_LOCK_UNLOCK, BrinValues::bv_allnulls, CHECK_FOR_INTERRUPTS, check_null_keys(), CurrentMemoryContext, DatumGetBool(), fmgr_info_copy(), FunctionCall3Coll(), FunctionCall4Coll(), i, index_getprocinfo(), IndexGetRelation(), IndexScanDescData::indexRelation, Int32GetDatum(), InvalidBuffer, InvalidOid, sort-test::key, IndexScanDescData::keyData, len, LockBuffer(), MAXALIGN, MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), Min, TupleDescData::natts, IndexScanDescData::numberOfKeys, BrinOpcInfo::oi_regular_nulls, IndexScanDescData::opaque, palloc(), palloc0_array, PG_USED_FOR_ASSERTS_ONLY, pgstat_count_index_scan, PointerGetDatum(), RelationGetNumberOfBlocks, RelationGetRelid, ReleaseBuffer(), size, ScanKeyData::sk_collation, SK_ISNULL, table_close(), table_open(), tbm_add_page(), and TupleDescAttr.
Referenced by brinhandler().
bool brininsert | ( | Relation | idxRel, |
Datum * | values, | ||
bool * | nulls, | ||
ItemPointer | heaptid, | ||
Relation | heapRel, | ||
IndexUniqueCheck | checkUnique, | ||
bool | indexUnchanged, | ||
struct IndexInfo * | indexInfo | ||
) |
Definition at line 339 of file brin.c.
References add_values_to_range(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, AutoVacuumRequestWork(), AVW_BRINSummarizeRange, BrinInsertState::bis_desc, BrinInsertState::bis_pages_per_range, BrinInsertState::bis_rmAccess, brin_can_do_samepage_update(), brin_copy_tuple(), brin_deform_tuple(), brin_doupdate(), brin_form_tuple(), BrinGetAutoSummarize, brinGetTupleForHeapBlock(), buf, BUFFER_LOCK_SHARE, BUFFER_LOCK_UNLOCK, BufferGetPage(), BufferIsValid(), CHECK_FOR_INTERRUPTS, CurrentMemoryContext, ereport, errcode(), errmsg(), FirstOffsetNumber, IndexInfo::ii_AmCache, initialize_brin_insertstate(), InvalidBuffer, ItemIdGetLength, ItemPointerGetBlockNumber(), ItemPointerGetOffsetNumber(), LockBuffer(), LOG, MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), PageGetItemId(), RelationGetRelationName, RelationGetRelid, ReleaseBuffer(), and values.
Referenced by brinhandler().
Definition at line 507 of file brin.c.
References BrinInsertState::bis_desc, BrinInsertState::bis_rmAccess, brinRevmapTerminate(), if(), and IndexInfo::ii_AmCache.
Referenced by brinhandler().
Definition at line 1339 of file brin.c.
References build_reloptions(), lengthof, RELOPT_KIND_BRIN, RELOPT_TYPE_BOOL, and RELOPT_TYPE_INT.
Referenced by brinhandler().
void brinrescan | ( | IndexScanDesc | scan, |
ScanKey | scankey, | ||
int | nscankeys, | ||
ScanKey | orderbys, | ||
int | norderbys | ||
) |
Definition at line 950 of file brin.c.
References IndexScanDescData::keyData, and IndexScanDescData::numberOfKeys.
Referenced by brinhandler().
IndexBulkDeleteResult* brinvacuumcleanup | ( | IndexVacuumInfo * | info, |
IndexBulkDeleteResult * | stats | ||
) |
Definition at line 1309 of file brin.c.
References AccessShareLock, IndexVacuumInfo::analyze_only, BRIN_ALL_BLOCKRANGES, brin_vacuum_scan(), brinsummarize(), IndexVacuumInfo::index, IndexGetRelation(), IndexBulkDeleteResult::num_index_tuples, IndexBulkDeleteResult::num_pages, palloc0_object, RelationGetNumberOfBlocks, RelationGetRelid, IndexVacuumInfo::strategy, table_close(), and table_open().
Referenced by brinhandler().
bool brinvalidate | ( | Oid | opclassoid | ) |
Definition at line 37 of file brin_validate.c.
References BRIN_FIRST_OPTIONAL_PROCNUM, BRIN_LAST_OPTIONAL_PROCNUM, BRIN_MANDATORY_NPROCS, BRIN_PROCNUM_ADDVALUE, BRIN_PROCNUM_CONSISTENT, BRIN_PROCNUM_OPCINFO, BRIN_PROCNUM_OPTIONS, BRIN_PROCNUM_UNION, check_amop_signature(), check_amoptsproc_signature(), check_amproc_signature(), elog, ereport, errcode(), errmsg(), ERROR, format_operator(), format_procedure(), format_type_be(), OpFamilyOpFuncGroup::functionset, GETSTRUCT, HeapTupleIsValid, i, identify_opfamily_groups(), INFO, OpFamilyOpFuncGroup::lefttype, lfirst, catclist::members, catclist::n_members, NameStr, ObjectIdGetDatum(), OidIsValid, OpFamilyOpFuncGroup::operatorset, ReleaseCatCacheList(), ReleaseSysCache(), OpFamilyOpFuncGroup::righttype, SearchSysCache1(), SearchSysCacheList1, and catctup::tuple.
Referenced by brinhandler().