39 #include "utils/fmgrprotos.h"
47 #define PARALLEL_KEY_BRIN_SHARED UINT64CONST(0xB000000000000001)
48 #define PARALLEL_KEY_TUPLESORT UINT64CONST(0xB000000000000002)
49 #define PARALLEL_KEY_QUERY_TEXT UINT64CONST(0xB000000000000003)
50 #define PARALLEL_KEY_WAL_USAGE UINT64CONST(0xB000000000000004)
51 #define PARALLEL_KEY_BUFFER_USAGE UINT64CONST(0xB000000000000005)
113 #define ParallelTableScanFromBrinShared(shared) \
114 (ParallelTableScanDesc) ((char *) (shared) + BUFFERALIGN(sizeof(BrinShared)))
206 #define BRIN_ALL_BLOCKRANGES InvalidBlockNumber
215 bool include_partial,
double *numSummarized,
double *numExisting);
229 bool isconcurrent,
int request);
368 heapBlk = (origHeapBlk / pagesPerRange) * pagesPerRange;
372 bool need_insert =
false;
386 heapBlk == origHeapBlk &&
404 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
405 errmsg(
"request for BRIN range summarization for index \"%s\" page %u was not recorded",
477 buf, off, origtup, origsz, newtup, newsz,
639 nnullkeys = (
int *) ptr;
658 for (
int keyno = 0; keyno < scan->
numberOfKeys; keyno++)
669 (
key->sk_collation ==
671 keyattno - 1)->attcollation));
683 if (consistentFn[keyattno - 1].fn_oid ==
InvalidOid)
688 Assert(nkeys[keyattno - 1] == 0);
689 Assert(nnullkeys[keyattno - 1] == 0);
700 nullkeys[keyattno - 1][nnullkeys[keyattno - 1]] =
key;
701 nnullkeys[keyattno - 1]++;
705 keys[keyattno - 1][nkeys[keyattno - 1]] =
key;
706 nkeys[keyattno - 1]++;
730 bool gottuple =
false;
789 if (nkeys[attno - 1] == 0 && nnullkeys[attno - 1] == 0)
815 nnullkeys[attno - 1]))
835 if (!nkeys[attno - 1])
838 Assert((nkeys[attno - 1] > 0) &&
865 if (consistentFn[attno - 1].fn_nargs >= 4)
888 for (keyno = 0; keyno < nkeys[attno - 1]; keyno++)
891 keys[attno - 1][keyno]->sk_collation,
916 for (pageno = heapBlk;
939 return totalpages * 10;
947 ScanKey orderbys,
int norderbys)
958 memmove(scan->
keyData, scankey,
1001 while (thisblock >
state->bs_currRangeStart +
state->bs_pagesPerRange - 1)
1005 "brinbuildCallback: completed a range: %u--%u",
1006 state->bs_currRangeStart,
1007 state->bs_currRangeStart +
state->bs_pagesPerRange));
1013 state->bs_currRangeStart +=
state->bs_pagesPerRange;
1057 if ((thisblock < state->bs_currRangeStart) ||
1058 (thisblock >
state->bs_currRangeStart +
state->bs_pagesPerRange - 1))
1062 "brinbuildCallbackParallel: completed a range: %u--%u",
1063 state->bs_currRangeStart,
1064 state->bs_currRangeStart +
state->bs_pagesPerRange));
1077 state->bs_currRangeStart
1078 =
state->bs_pagesPerRange * (thisblock /
state->bs_pagesPerRange);
1107 elog(
ERROR,
"index \"%s\" already contains data",
1172 if (
state->bs_leader)
1179 state->bs_leader->nparticipanttuplesorts;
1204 state->bs_sortstate =
1241 state->bs_currRangeStart,
1242 state->bs_maxRangeStart);
1246 idxtuples =
state->bs_numtuples;
1378 int save_sec_context;
1380 double numSummarized = 0;
1384 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1385 errmsg(
"recovery is in progress"),
1386 errhint(
"BRIN control functions cannot be executed during recovery.")));
1390 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1391 errmsg(
"block number out of range: %lld",
1392 (
long long) heapBlk64)));
1425 save_sec_context = -1;
1426 save_nestlevel = -1;
1432 if (indexRel->
rd_rel->relkind != RELKIND_INDEX ||
1433 indexRel->
rd_rel->relam != BRIN_AM_OID)
1435 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1436 errmsg(
"\"%s\" is not a BRIN index",
1440 if (heapRel != NULL && !
object_ownercheck(RelationRelationId, indexoid, save_userid))
1452 errmsg(
"could not open parent table of index \"%s\"",
1456 if (indexRel->
rd_index->indisvalid)
1457 brinsummarize(indexRel, heapRel, heapBlk,
true, &numSummarized, NULL);
1460 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1461 errmsg(
"index \"%s\" is not valid",
1492 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1493 errmsg(
"recovery is in progress"),
1494 errhint(
"BRIN control functions cannot be executed during recovery.")));
1498 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1499 errmsg(
"block number out of range: %lld",
1500 (
long long) heapBlk64)));
1521 if (indexRel->
rd_rel->relkind != RELKIND_INDEX ||
1522 indexRel->
rd_rel->relam != BRIN_AM_OID)
1524 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1525 errmsg(
"\"%s\" is not a BRIN index",
1541 errmsg(
"could not open parent table of index \"%s\"",
1545 if (indexRel->
rd_index->indisvalid)
1556 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1557 errmsg(
"index \"%s\" is not valid",
1575 int totalstored = 0;
1592 for (keyno = 0; keyno < tupdesc->
natts; keyno++)
1605 totalsize = offsetof(
BrinDesc, bd_info) +
1608 bdesc =
palloc(totalsize);
1615 for (keyno = 0; keyno < tupdesc->
natts; keyno++)
1616 bdesc->
bd_info[keyno] = opcinfo[keyno];
1666 state->bs_irel = idxRel;
1667 state->bs_numtuples = 0;
1668 state->bs_reltuples = 0;
1670 state->bs_pagesPerRange = pagesPerRange;
1671 state->bs_currRangeStart = 0;
1672 state->bs_rmAccess = revmap;
1675 state->bs_leader = NULL;
1676 state->bs_worker_id = 0;
1677 state->bs_sortstate = NULL;
1679 state->bs_emptyTuple = NULL;
1680 state->bs_emptyTupleLen = 0;
1684 state->bs_emptyTuple = NULL;
1685 state->bs_emptyTupleLen = 0;
1693 lastRange = ((tablePages - 1) / pagesPerRange) * pagesPerRange;
1696 state->bs_maxRangeStart = lastRange +
state->bs_pagesPerRange;
1765 state->bs_rmAccess, &phbuf,
1766 heapBlk, phtup, phsz);
1773 if (heapBlk +
state->bs_pagesPerRange > heapNumBlks)
1787 state->bs_pagesPerRange);
1792 scanNumBlks =
state->bs_pagesPerRange;
1805 state->bs_currRangeStart = heapBlk;
1807 heapBlk, scanNumBlks,
1829 heapBlk,
state->bs_dtuple, &newsize);
1833 state->bs_rmAccess, heapBlk, phbuf, offset,
1834 phtup, phsz, newtup, newsize, samepage);
1853 elog(
ERROR,
"missing placeholder tuple");
1877 bool include_partial,
double *numSummarized,
double *numExisting)
1895 startBlk = (pageRange / pagesPerRange) * pagesPerRange;
1896 heapNumBlocks =
Min(heapNumBlocks, startBlk + pagesPerRange);
1898 if (startBlk > heapNumBlocks)
1909 for (; startBlk < heapNumBlocks; startBlk += pagesPerRange)
1921 if (!include_partial &&
1922 (startBlk + pagesPerRange > heapNumBlocks))
1947 *numSummarized += 1.0;
1952 *numExisting += 1.0;
1982 &
state->bs_currentInsertBuf,
state->bs_currRangeStart,
1984 state->bs_numtuples++;
2001 if (
state->bs_dtuple->bt_empty_range)
2010 state->bs_numtuples++;
2061 if (
a->bt_empty_range)
2085 a->bt_empty_range =
false;
2171 for (blkno = 0; blkno < nblocks; blkno++)
2296 for (keyno = 0; keyno < nnullkeys; keyno++)
2353 bool isconcurrent,
int request)
2356 int scantuplesortstates;
2365 bool leaderparticipates =
true;
2368 #ifdef DISABLE_LEADER_PARTICIPATION
2369 leaderparticipates =
false;
2381 scantuplesortstates = leaderparticipates ? request + 1 : request;
2434 if (pcxt->
seg == NULL)
2501 brinleader->
pcxt = pcxt;
2503 if (leaderparticipates)
2522 if (leaderparticipates)
2570 int nparticipanttuplesorts;
2572 nparticipanttuplesorts =
state->bs_leader->nparticipanttuplesorts;
2588 WAIT_EVENT_PARALLEL_CREATE_INDEX_SCAN);
2593 return state->bs_reltuples;
2830 state->bs_reltuples += reltuples;
2917 heapRel, indexRel, sortmem,
false);
2944 if (
state->bs_emptyTuple == NULL)
2953 &
state->bs_emptyTupleLen);
2960 state->bs_emptyTuple->bt_blkno = blkno;
2990 while (blkno < nextRange)
2996 &
state->bs_currentInsertBuf,
2997 blkno,
state->bs_emptyTuple,
state->bs_emptyTupleLen);
3000 blkno +=
state->bs_pagesPerRange;
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
bool AutoVacuumRequestWork(AutoVacuumWorkItemType type, Oid relationId, BlockNumber blkno)
void InitializeParallelDSM(ParallelContext *pcxt)
void WaitForParallelWorkersToFinish(ParallelContext *pcxt)
void LaunchParallelWorkers(ParallelContext *pcxt)
void DestroyParallelContext(ParallelContext *pcxt)
ParallelContext * CreateParallelContext(const char *library_name, const char *function_name, int nworkers)
void WaitForParallelWorkersToAttach(ParallelContext *pcxt)
void pgstat_report_activity(BackendState state, const char *cmd_str)
#define InvalidBlockNumber
static Datum values[MAXATTR]
#define PARALLEL_KEY_BUFFER_USAGE
IndexBulkDeleteResult * brinvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
void brininsertcleanup(Relation index, IndexInfo *indexInfo)
static void brin_vacuum_scan(Relation idxrel, BufferAccessStrategy strategy)
Datum brin_desummarize_range(PG_FUNCTION_ARGS)
void brinrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys, ScanKey orderbys, int norderbys)
static void terminate_brin_buildstate(BrinBuildState *state)
#define PARALLEL_KEY_BRIN_SHARED
Datum brin_summarize_range(PG_FUNCTION_ARGS)
static double _brin_parallel_heapscan(BrinBuildState *buildstate)
static void form_and_spill_tuple(BrinBuildState *state)
#define BRIN_ALL_BLOCKRANGES
struct BrinShared BrinShared
Datum brin_summarize_new_values(PG_FUNCTION_ARGS)
IndexScanDesc brinbeginscan(Relation r, int nkeys, int norderbys)
IndexBuildResult * brinbuild(Relation heap, Relation index, IndexInfo *indexInfo)
int64 bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
static void brinsummarize(Relation index, Relation heapRel, BlockNumber pageRange, bool include_partial, double *numSummarized, double *numExisting)
static void form_and_insert_tuple(BrinBuildState *state)
void brinbuildempty(Relation index)
void brin_free_desc(BrinDesc *bdesc)
struct BrinInsertState BrinInsertState
static void union_tuples(BrinDesc *bdesc, BrinMemTuple *a, BrinTuple *b)
static BrinBuildState * initialize_brin_buildstate(Relation idxRel, BrinRevmap *revmap, BlockNumber pagesPerRange, BlockNumber tablePages)
static void _brin_begin_parallel(BrinBuildState *buildstate, Relation heap, Relation index, bool isconcurrent, int request)
void brinGetStats(Relation index, BrinStatsData *stats)
BrinDesc * brin_build_desc(Relation rel)
static void _brin_leader_participate_as_worker(BrinBuildState *buildstate, Relation heap, Relation index)
static bool add_values_to_range(Relation idxRel, BrinDesc *bdesc, BrinMemTuple *dtup, const Datum *values, const bool *nulls)
static double _brin_parallel_merge(BrinBuildState *buildstate)
static void _brin_parallel_scan_and_build(BrinBuildState *buildstate, BrinShared *brinshared, Sharedsort *sharedsort, Relation heap, Relation index, int sortmem, bool progress)
static void _brin_end_parallel(BrinLeader *brinleader, BrinBuildState *state)
static Size _brin_parallel_estimate_shared(Relation heap, Snapshot snapshot)
struct BrinBuildState BrinBuildState
static void brin_fill_empty_ranges(BrinBuildState *state, BlockNumber prevRange, BlockNumber nextRange)
struct BrinLeader BrinLeader
struct BrinOpaque BrinOpaque
static void summarize_range(IndexInfo *indexInfo, BrinBuildState *state, Relation heapRel, BlockNumber heapBlk, BlockNumber heapNumBlks)
#define ParallelTableScanFromBrinShared(shared)
#define PARALLEL_KEY_TUPLESORT
static void brinbuildCallbackParallel(Relation index, ItemPointer tid, Datum *values, bool *isnull, bool tupleIsAlive, void *brstate)
bool brininsert(Relation idxRel, Datum *values, bool *nulls, ItemPointer heaptid, Relation heapRel, IndexUniqueCheck checkUnique, bool indexUnchanged, IndexInfo *indexInfo)
#define PARALLEL_KEY_QUERY_TEXT
Datum brinhandler(PG_FUNCTION_ARGS)
void _brin_parallel_build_main(dsm_segment *seg, shm_toc *toc)
static void brin_build_empty_tuple(BrinBuildState *state, BlockNumber blkno)
#define PARALLEL_KEY_WAL_USAGE
bytea * brinoptions(Datum reloptions, bool validate)
IndexBulkDeleteResult * brinbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback, void *callback_state)
static BrinInsertState * initialize_brin_insertstate(Relation idxRel, IndexInfo *indexInfo)
static void brinbuildCallback(Relation index, ItemPointer tid, Datum *values, bool *isnull, bool tupleIsAlive, void *brstate)
void brinendscan(IndexScanDesc scan)
static bool check_null_keys(BrinValues *bval, ScanKey *nullkeys, int nnullkeys)
#define BrinGetPagesPerRange(relation)
#define BrinGetAutoSummarize(relation)
#define BRIN_LAST_OPTIONAL_PROCNUM
#define BRIN_PROCNUM_UNION
#define BRIN_PROCNUM_OPTIONS
#define BRIN_PROCNUM_OPCINFO
#define BRIN_PROCNUM_CONSISTENT
#define BRIN_PROCNUM_ADDVALUE
#define BRIN_CURRENT_VERSION
#define BRIN_METAPAGE_BLKNO
bool brin_doupdate(Relation idxrel, BlockNumber pagesPerRange, BrinRevmap *revmap, BlockNumber heapBlk, Buffer oldbuf, OffsetNumber oldoff, const BrinTuple *origtup, Size origsz, const BrinTuple *newtup, Size newsz, bool samepage)
void brin_page_cleanup(Relation idxrel, Buffer buf)
OffsetNumber brin_doinsert(Relation idxrel, BlockNumber pagesPerRange, BrinRevmap *revmap, Buffer *buffer, BlockNumber heapBlk, BrinTuple *tup, Size itemsz)
void brin_metapage_init(Page page, BlockNumber pagesPerRange, uint16 version)
bool brin_can_do_samepage_update(Buffer buffer, Size origsz, Size newsz)
bool brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk)
void brinRevmapTerminate(BrinRevmap *revmap)
BrinTuple * brinGetTupleForHeapBlock(BrinRevmap *revmap, BlockNumber heapBlk, Buffer *buf, OffsetNumber *off, Size *size, int mode)
BrinRevmap * brinRevmapInitialize(Relation idxrel, BlockNumber *pagesPerRange)
BrinTuple * brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, Size *size)
BrinMemTuple * brin_new_memtuple(BrinDesc *brdesc)
BrinMemTuple * brin_deform_tuple(BrinDesc *brdesc, BrinTuple *tuple, BrinMemTuple *dMemtuple)
BrinMemTuple * brin_memtuple_initialize(BrinMemTuple *dtuple, BrinDesc *brdesc)
BrinTuple * brin_copy_tuple(BrinTuple *tuple, Size len, BrinTuple *dest, Size *destsz)
void brin_free_tuple(BrinTuple *tuple)
BrinTuple * brin_form_placeholder_tuple(BrinDesc *brdesc, BlockNumber blkno, Size *size)
bool brinvalidate(Oid opclassoid)
#define SizeOfBrinCreateIdx
#define XLOG_BRIN_CREATE_INDEX
#define BufferIsInvalid(buffer)
BlockNumber BufferGetBlockNumber(Buffer buffer)
Buffer ExtendBufferedRel(BufferManagerRelation bmr, ForkNumber forkNum, BufferAccessStrategy strategy, uint32 flags)
void ReleaseBuffer(Buffer buffer)
void UnlockReleaseBuffer(Buffer buffer)
void MarkBufferDirty(Buffer buffer)
void LockBuffer(Buffer buffer, int mode)
Buffer ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum, ReadBufferMode mode, BufferAccessStrategy strategy)
Buffer ReadBuffer(Relation reln, BlockNumber blockNum)
#define BUFFER_LOCK_UNLOCK
#define BUFFER_LOCK_SHARE
#define RelationGetNumberOfBlocks(reln)
static Page BufferGetPage(Buffer buffer)
static bool BufferIsValid(Buffer bufnum)
Size PageGetFreeSpace(Page page)
static char * PageGetContents(Page page)
static ItemId PageGetItemId(Page page, OffsetNumber offsetNumber)
static void PageSetLSN(Page page, XLogRecPtr lsn)
#define PG_USED_FOR_ASSERTS_ONLY
#define Assert(condition)
#define OidIsValid(objectId)
bool ConditionVariableCancelSleep(void)
void ConditionVariableInit(ConditionVariable *cv)
void ConditionVariableSleep(ConditionVariable *cv, uint32 wait_event_info)
void ConditionVariableSignal(ConditionVariable *cv)
Datum datumCopy(Datum value, bool typByVal, int typLen)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define palloc_object(type)
#define palloc_array(type, count)
#define palloc0_array(type, count)
#define palloc0_object(type)
Datum FunctionCall4Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4)
Datum Int64GetDatum(int64 X)
Datum FunctionCall3Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3)
void fmgr_info_copy(FmgrInfo *dstinfo, FmgrInfo *srcinfo, MemoryContext destcxt)
#define DirectFunctionCall2(func, arg1, arg2)
#define PG_GETARG_DATUM(n)
#define PG_GETARG_INT64(n)
#define FunctionCall1(flinfo, arg1)
#define PG_RETURN_INT32(x)
#define PG_RETURN_POINTER(x)
void FreeSpaceMapVacuumRange(Relation rel, BlockNumber start, BlockNumber end)
void FreeSpaceMapVacuum(Relation rel)
void RecordPageWithFreeSpace(Relation rel, BlockNumber heapBlk, Size spaceAvail)
IndexScanDesc RelationGetIndexScan(Relation indexRelation, int nkeys, int norderbys)
bool(* IndexBulkDeleteCallback)(ItemPointer itemptr, void *state)
int NewGUCNestLevel(void)
void RestrictSearchPath(void)
void AtEOXact_GUC(bool isCommit, int nestLevel)
Oid IndexGetRelation(Oid indexId, bool missing_ok)
IndexInfo * BuildIndexInfo(Relation index)
void index_close(Relation relation, LOCKMODE lockmode)
FmgrInfo * index_getprocinfo(Relation irel, AttrNumber attnum, uint16 procnum)
Relation index_open(Oid relationId, LOCKMODE lockmode)
void InstrAccumParallelQuery(BufferUsage *bufusage, WalUsage *walusage)
void InstrEndParallelQuery(BufferUsage *bufusage, WalUsage *walusage)
void InstrStartParallelQuery(void)
if(TABLE==NULL||TABLE_index==NULL)
#define ItemIdGetLength(itemId)
static OffsetNumber ItemPointerGetOffsetNumber(const ItemPointerData *pointer)
static BlockNumber ItemPointerGetBlockNumber(const ItemPointerData *pointer)
#define AccessExclusiveLock
#define ShareUpdateExclusiveLock
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define ALLOCSET_SMALL_SIZES
#define SECURITY_RESTRICTED_OPERATION
#define START_CRIT_SECTION()
#define CHECK_FOR_INTERRUPTS()
#define END_CRIT_SECTION()
void GetUserIdAndSecContext(Oid *userid, int *sec_context)
void SetUserIdAndSecContext(Oid userid, int sec_context)
#define FirstOffsetNumber
FormData_pg_attribute * Form_pg_attribute
#define ERRCODE_UNDEFINED_TABLE
#define pgstat_count_index_scan(rel)
const char * debug_query_string
static bool DatumGetBool(Datum X)
static Datum PointerGetDatum(const void *X)
static Pointer DatumGetPointer(Datum X)
static Datum Int32GetDatum(int32 X)
MemoryContextSwitchTo(old_ctx)
static void addrange(struct cvec *cv, chr from, chr to)
#define RelationGetRelid(relation)
#define RelationGetDescr(relation)
#define RelationGetRelationName(relation)
#define RelationNeedsWAL(relation)
void * build_reloptions(Datum reloptions, bool validate, relopt_kind kind, Size relopt_struct_size, const relopt_parse_elt *relopt_elems, int num_relopt_elems)
void brincostestimate(PlannerInfo *root, IndexPath *path, double loop_count, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, double *indexCorrelation, double *indexPages)
void shm_toc_insert(shm_toc *toc, uint64 key, void *address)
void * shm_toc_allocate(shm_toc *toc, Size nbytes)
void * shm_toc_lookup(shm_toc *toc, uint64 key, bool noError)
#define shm_toc_estimate_chunk(e, sz)
#define shm_toc_estimate_keys(e, cnt)
Size add_size(Size s1, Size s2)
Size mul_size(Size s1, Size s2)
static pg_noinline void Size size
Snapshot GetTransactionSnapshot(void)
void UnregisterSnapshot(Snapshot snapshot)
Snapshot RegisterSnapshot(Snapshot snapshot)
#define IsMVCCSnapshot(snapshot)
#define SpinLockInit(lock)
#define SpinLockRelease(lock)
#define SpinLockAcquire(lock)
void relation_close(Relation relation, LOCKMODE lockmode)
BlockNumber bs_maxRangeStart
BlockNumber bs_pagesPerRange
Buffer bs_currentInsertBuf
Tuplesortstate * bs_sortstate
BlockNumber bs_currRangeStart
BrinTuple * bs_emptyTuple
BrinOpcInfo * bd_info[FLEXIBLE_ARRAY_MEMBER]
BrinRevmap * bis_rmAccess
BlockNumber bis_pages_per_range
int nparticipanttuplesorts
BufferUsage * bufferusage
BrinValues bt_columns[FLEXIBLE_ARRAY_MEMBER]
BlockNumber lastRevmapPage
BlockNumber pagesPerRange
BlockNumber bo_pagesPerRange
TypeCacheEntry * oi_typcache[FLEXIBLE_ARRAY_MEMBER]
BlockNumber pagesPerRange
ConditionVariable workersdonecv
BlockNumber revmapNumPages
BlockNumber pagesPerRange
ambuildphasename_function ambuildphasename
ambuildempty_function ambuildempty
amvacuumcleanup_function amvacuumcleanup
amoptions_function amoptions
amestimateparallelscan_function amestimateparallelscan
amrestrpos_function amrestrpos
aminsert_function aminsert
amendscan_function amendscan
amparallelrescan_function amparallelrescan
amcostestimate_function amcostestimate
amadjustmembers_function amadjustmembers
amgettuple_function amgettuple
amcanreturn_function amcanreturn
amgetbitmap_function amgetbitmap
amproperty_function amproperty
ambulkdelete_function ambulkdelete
amvalidate_function amvalidate
ammarkpos_function ammarkpos
bool amusemaintenanceworkmem
ambeginscan_function ambeginscan
amrescan_function amrescan
aminitparallelscan_function aminitparallelscan
uint8 amparallelvacuumoptions
aminsertcleanup_function aminsertcleanup
struct ScanKeyData * keyData
BufferAccessStrategy strategy
shm_toc_estimator estimator
BlockNumber pagesPerRange
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
TableScanDesc table_beginscan_parallel(Relation relation, ParallelTableScanDesc pscan)
Size table_parallelscan_estimate(Relation rel, Snapshot snapshot)
void table_parallelscan_initialize(Relation rel, ParallelTableScanDesc pscan, Snapshot snapshot)
static double table_index_build_range_scan(Relation table_rel, Relation index_rel, struct IndexInfo *index_info, bool allow_sync, bool anyvisible, bool progress, BlockNumber start_blockno, BlockNumber numblocks, IndexBuildCallback callback, void *callback_state, TableScanDesc scan)
static double table_index_build_scan(Relation table_rel, Relation index_rel, struct IndexInfo *index_info, bool allow_sync, bool progress, IndexBuildCallback callback, void *callback_state, TableScanDesc scan)
static void callback(struct sockaddr *addr, struct sockaddr *mask, void *unused)
void tbm_add_page(TIDBitmap *tbm, BlockNumber pageno)
#define TupleDescAttr(tupdesc, i)
void tuplesort_performsort(Tuplesortstate *state)
void tuplesort_initialize_shared(Sharedsort *shared, int nWorkers, dsm_segment *seg)
Size tuplesort_estimate_shared(int nWorkers)
void tuplesort_end(Tuplesortstate *state)
void tuplesort_attach_shared(Sharedsort *shared, dsm_segment *seg)
struct SortCoordinateData * SortCoordinate
Tuplesortstate * tuplesort_begin_index_brin(int workMem, SortCoordinate coordinate, int sortopt)
void tuplesort_putbrintuple(Tuplesortstate *state, BrinTuple *tuple, Size size)
BrinTuple * tuplesort_getbrintuple(Tuplesortstate *state, Size *len, bool forward)
#define VACUUM_OPTION_PARALLEL_CLEANUP
void ExitParallelMode(void)
void EnterParallelMode(void)
bool RecoveryInProgress(void)
void XLogRegisterData(char *data, uint32 len)
XLogRecPtr XLogInsert(RmgrId rmid, uint8 info)
XLogRecPtr log_newpage_buffer(Buffer buffer, bool page_std)
void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags)
void XLogBeginInsert(void)