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)
116 #define ParallelTableScanFromBrinShared(shared) \
117 (ParallelTableScanDesc) ((char *) (shared) + BUFFERALIGN(sizeof(BrinShared)))
209 #define BRIN_ALL_BLOCKRANGES InvalidBlockNumber
218 bool include_partial,
double *numSummarized,
double *numExisting);
232 bool isconcurrent,
int request);
372 heapBlk = (origHeapBlk / pagesPerRange) * pagesPerRange;
376 bool need_insert =
false;
390 heapBlk == origHeapBlk &&
408 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
409 errmsg(
"request for BRIN range summarization for index \"%s\" page %u was not recorded",
481 buf, off, origtup, origsz, newtup, newsz,
643 nnullkeys = (
int *) ptr;
662 for (
int keyno = 0; keyno < scan->
numberOfKeys; keyno++)
673 (
key->sk_collation ==
675 keyattno - 1)->attcollation));
687 if (consistentFn[keyattno - 1].fn_oid ==
InvalidOid)
692 Assert(nkeys[keyattno - 1] == 0);
693 Assert(nnullkeys[keyattno - 1] == 0);
704 nullkeys[keyattno - 1][nnullkeys[keyattno - 1]] =
key;
705 nnullkeys[keyattno - 1]++;
709 keys[keyattno - 1][nkeys[keyattno - 1]] =
key;
710 nkeys[keyattno - 1]++;
734 bool gottuple =
false;
793 if (nkeys[attno - 1] == 0 && nnullkeys[attno - 1] == 0)
819 nnullkeys[attno - 1]))
839 if (!nkeys[attno - 1])
842 Assert((nkeys[attno - 1] > 0) &&
869 if (consistentFn[attno - 1].fn_nargs >= 4)
892 for (keyno = 0; keyno < nkeys[attno - 1]; keyno++)
895 keys[attno - 1][keyno]->sk_collation,
920 for (pageno = heapBlk;
943 return totalpages * 10;
951 ScanKey orderbys,
int norderbys)
1004 while (thisblock >
state->bs_currRangeStart +
state->bs_pagesPerRange - 1)
1008 "brinbuildCallback: completed a range: %u--%u",
1009 state->bs_currRangeStart,
1010 state->bs_currRangeStart +
state->bs_pagesPerRange));
1016 state->bs_currRangeStart +=
state->bs_pagesPerRange;
1060 if ((thisblock < state->bs_currRangeStart) ||
1061 (thisblock >
state->bs_currRangeStart +
state->bs_pagesPerRange - 1))
1065 "brinbuildCallbackParallel: completed a range: %u--%u",
1066 state->bs_currRangeStart,
1067 state->bs_currRangeStart +
state->bs_pagesPerRange));
1080 state->bs_currRangeStart
1081 =
state->bs_pagesPerRange * (thisblock /
state->bs_pagesPerRange);
1110 elog(
ERROR,
"index \"%s\" already contains data",
1175 if (
state->bs_leader)
1182 state->bs_leader->nparticipanttuplesorts;
1207 state->bs_sortstate =
1244 state->bs_currRangeStart,
1245 state->bs_maxRangeStart);
1249 idxtuples =
state->bs_numtuples;
1381 int save_sec_context;
1383 double numSummarized = 0;
1387 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1388 errmsg(
"recovery is in progress"),
1389 errhint(
"BRIN control functions cannot be executed during recovery.")));
1393 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1394 errmsg(
"block number out of range: %lld",
1395 (
long long) heapBlk64)));
1428 save_sec_context = -1;
1429 save_nestlevel = -1;
1435 if (indexRel->
rd_rel->relkind != RELKIND_INDEX ||
1436 indexRel->
rd_rel->relam != BRIN_AM_OID)
1438 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1439 errmsg(
"\"%s\" is not a BRIN index",
1443 if (heapRel != NULL && !
object_ownercheck(RelationRelationId, indexoid, save_userid))
1455 errmsg(
"could not open parent table of index \"%s\"",
1459 if (indexRel->
rd_index->indisvalid)
1460 brinsummarize(indexRel, heapRel, heapBlk,
true, &numSummarized, NULL);
1463 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1464 errmsg(
"index \"%s\" is not valid",
1495 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1496 errmsg(
"recovery is in progress"),
1497 errhint(
"BRIN control functions cannot be executed during recovery.")));
1501 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1502 errmsg(
"block number out of range: %lld",
1503 (
long long) heapBlk64)));
1524 if (indexRel->
rd_rel->relkind != RELKIND_INDEX ||
1525 indexRel->
rd_rel->relam != BRIN_AM_OID)
1527 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1528 errmsg(
"\"%s\" is not a BRIN index",
1544 errmsg(
"could not open parent table of index \"%s\"",
1548 if (indexRel->
rd_index->indisvalid)
1559 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1560 errmsg(
"index \"%s\" is not valid",
1578 int totalstored = 0;
1595 for (keyno = 0; keyno < tupdesc->
natts; keyno++)
1608 totalsize = offsetof(
BrinDesc, bd_info) +
1611 bdesc =
palloc(totalsize);
1618 for (keyno = 0; keyno < tupdesc->
natts; keyno++)
1619 bdesc->
bd_info[keyno] = opcinfo[keyno];
1669 state->bs_irel = idxRel;
1670 state->bs_numtuples = 0;
1671 state->bs_reltuples = 0;
1673 state->bs_pagesPerRange = pagesPerRange;
1674 state->bs_currRangeStart = 0;
1675 state->bs_rmAccess = revmap;
1678 state->bs_leader = NULL;
1679 state->bs_worker_id = 0;
1680 state->bs_sortstate = NULL;
1682 state->bs_emptyTuple = NULL;
1683 state->bs_emptyTupleLen = 0;
1687 state->bs_emptyTuple = NULL;
1688 state->bs_emptyTupleLen = 0;
1696 lastRange = ((tablePages - 1) / pagesPerRange) * pagesPerRange;
1699 state->bs_maxRangeStart = lastRange +
state->bs_pagesPerRange;
1768 state->bs_rmAccess, &phbuf,
1769 heapBlk, phtup, phsz);
1776 if (heapBlk +
state->bs_pagesPerRange > heapNumBlks)
1790 state->bs_pagesPerRange);
1795 scanNumBlks =
state->bs_pagesPerRange;
1808 state->bs_currRangeStart = heapBlk;
1810 heapBlk, scanNumBlks,
1832 heapBlk,
state->bs_dtuple, &newsize);
1836 state->bs_rmAccess, heapBlk, phbuf, offset,
1837 phtup, phsz, newtup, newsize, samepage);
1856 elog(
ERROR,
"missing placeholder tuple");
1880 bool include_partial,
double *numSummarized,
double *numExisting)
1898 startBlk = (pageRange / pagesPerRange) * pagesPerRange;
1899 heapNumBlocks =
Min(heapNumBlocks, startBlk + pagesPerRange);
1901 if (startBlk > heapNumBlocks)
1912 for (; startBlk < heapNumBlocks; startBlk += pagesPerRange)
1924 if (!include_partial &&
1925 (startBlk + pagesPerRange > heapNumBlocks))
1950 *numSummarized += 1.0;
1955 *numExisting += 1.0;
1985 &
state->bs_currentInsertBuf,
state->bs_currRangeStart,
1987 state->bs_numtuples++;
2004 if (
state->bs_dtuple->bt_empty_range)
2013 state->bs_numtuples++;
2064 if (
a->bt_empty_range)
2088 a->bt_empty_range =
false;
2174 for (blkno = 0; blkno < nblocks; blkno++)
2299 for (keyno = 0; keyno < nnullkeys; keyno++)
2356 bool isconcurrent,
int request)
2359 int scantuplesortstates;
2368 bool leaderparticipates =
true;
2371 #ifdef DISABLE_LEADER_PARTICIPATION
2372 leaderparticipates =
false;
2384 scantuplesortstates = leaderparticipates ? request + 1 : request;
2437 if (pcxt->
seg == NULL)
2505 brinleader->
pcxt = pcxt;
2507 if (leaderparticipates)
2526 if (leaderparticipates)
2574 int nparticipanttuplesorts;
2576 nparticipanttuplesorts =
state->bs_leader->nparticipanttuplesorts;
2592 WAIT_EVENT_PARALLEL_CREATE_INDEX_SCAN);
2597 return state->bs_reltuples;
2834 state->bs_reltuples += reltuples;
2924 heapRel, indexRel, sortmem,
false);
2951 if (
state->bs_emptyTuple == NULL)
2960 &
state->bs_emptyTupleLen);
2967 state->bs_emptyTuple->bt_blkno = blkno;
2997 while (blkno < nextRange)
3003 &
state->bs_currentInsertBuf,
3004 blkno,
state->bs_emptyTuple,
state->bs_emptyTupleLen);
3007 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)
uint64 pgstat_get_my_query_id(void)
void pgstat_report_query_id(uint64 query_id, bool force)
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 double _brin_parallel_merge(BrinBuildState *state)
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 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 void _brin_parallel_scan_and_build(BrinBuildState *state, BrinShared *brinshared, Sharedsort *sharedsort, Relation heap, Relation index, int sortmem, bool progress)
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 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)
static double _brin_parallel_heapscan(BrinBuildState *state)
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
amgettreeheight_function amgettreeheight
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)
XLogRecPtr XLogInsert(RmgrId rmid, uint8 info)
void XLogRegisterData(const char *data, uint32 len)
XLogRecPtr log_newpage_buffer(Buffer buffer, bool page_std)
void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags)
void XLogBeginInsert(void)