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);
366 heapBlk = (origHeapBlk / pagesPerRange) * pagesPerRange;
370 bool need_insert =
false;
384 heapBlk == origHeapBlk &&
402 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
403 errmsg(
"request for BRIN range summarization for index \"%s\" page %u was not recorded",
475 buf, off, origtup, origsz, newtup, newsz,
635 nnullkeys = (
int *) ptr;
654 for (
int keyno = 0; keyno < scan->
numberOfKeys; keyno++)
665 (
key->sk_collation ==
667 keyattno - 1)->attcollation));
679 if (consistentFn[keyattno - 1].fn_oid ==
InvalidOid)
684 Assert(nkeys[keyattno - 1] == 0);
685 Assert(nnullkeys[keyattno - 1] == 0);
696 nullkeys[keyattno - 1][nnullkeys[keyattno - 1]] =
key;
697 nnullkeys[keyattno - 1]++;
701 keys[keyattno - 1][nkeys[keyattno - 1]] =
key;
702 nkeys[keyattno - 1]++;
726 bool gottuple =
false;
785 if (nkeys[attno - 1] == 0 && nnullkeys[attno - 1] == 0)
811 nnullkeys[attno - 1]))
831 if (!nkeys[attno - 1])
834 Assert((nkeys[attno - 1] > 0) &&
861 if (consistentFn[attno - 1].fn_nargs >= 4)
884 for (keyno = 0; keyno < nkeys[attno - 1]; keyno++)
887 keys[attno - 1][keyno]->sk_collation,
912 for (pageno = heapBlk;
935 return totalpages * 10;
943 ScanKey orderbys,
int norderbys)
954 memmove(scan->
keyData, scankey,
997 while (thisblock >
state->bs_currRangeStart +
state->bs_pagesPerRange - 1)
1001 "brinbuildCallback: completed a range: %u--%u",
1002 state->bs_currRangeStart,
1003 state->bs_currRangeStart +
state->bs_pagesPerRange));
1009 state->bs_currRangeStart +=
state->bs_pagesPerRange;
1053 if ((thisblock < state->bs_currRangeStart) ||
1054 (thisblock >
state->bs_currRangeStart +
state->bs_pagesPerRange - 1))
1058 "brinbuildCallbackParallel: completed a range: %u--%u",
1059 state->bs_currRangeStart,
1060 state->bs_currRangeStart +
state->bs_pagesPerRange));
1073 state->bs_currRangeStart
1074 =
state->bs_pagesPerRange * (thisblock /
state->bs_pagesPerRange);
1103 elog(
ERROR,
"index \"%s\" already contains data",
1168 if (
state->bs_leader)
1175 state->bs_leader->nparticipanttuplesorts;
1200 state->bs_sortstate =
1234 state->bs_currRangeStart,
1235 state->bs_maxRangeStart);
1238 state->bs_reltuples = reltuples;
1242 idxtuples =
state->bs_numtuples;
1243 reltuples =
state->bs_reltuples;
1375 int save_sec_context;
1377 double numSummarized = 0;
1381 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1382 errmsg(
"recovery is in progress"),
1383 errhint(
"BRIN control functions cannot be executed during recovery.")));
1387 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1388 errmsg(
"block number out of range: %lld",
1389 (
long long) heapBlk64)));
1422 save_sec_context = -1;
1423 save_nestlevel = -1;
1429 if (indexRel->
rd_rel->relkind != RELKIND_INDEX ||
1430 indexRel->
rd_rel->relam != BRIN_AM_OID)
1432 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1433 errmsg(
"\"%s\" is not a BRIN index",
1437 if (heapRel != NULL && !
object_ownercheck(RelationRelationId, indexoid, save_userid))
1449 errmsg(
"could not open parent table of index \"%s\"",
1453 if (indexRel->
rd_index->indisvalid)
1454 brinsummarize(indexRel, heapRel, heapBlk,
true, &numSummarized, NULL);
1457 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1458 errmsg(
"index \"%s\" is not valid",
1489 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1490 errmsg(
"recovery is in progress"),
1491 errhint(
"BRIN control functions cannot be executed during recovery.")));
1495 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
1496 errmsg(
"block number out of range: %lld",
1497 (
long long) heapBlk64)));
1518 if (indexRel->
rd_rel->relkind != RELKIND_INDEX ||
1519 indexRel->
rd_rel->relam != BRIN_AM_OID)
1521 (
errcode(ERRCODE_WRONG_OBJECT_TYPE),
1522 errmsg(
"\"%s\" is not a BRIN index",
1538 errmsg(
"could not open parent table of index \"%s\"",
1542 if (indexRel->
rd_index->indisvalid)
1553 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1554 errmsg(
"index \"%s\" is not valid",
1572 int totalstored = 0;
1589 for (keyno = 0; keyno < tupdesc->
natts; keyno++)
1602 totalsize = offsetof(
BrinDesc, bd_info) +
1605 bdesc =
palloc(totalsize);
1612 for (keyno = 0; keyno < tupdesc->
natts; keyno++)
1613 bdesc->
bd_info[keyno] = opcinfo[keyno];
1663 state->bs_irel = idxRel;
1664 state->bs_numtuples = 0;
1665 state->bs_reltuples = 0;
1667 state->bs_pagesPerRange = pagesPerRange;
1668 state->bs_currRangeStart = 0;
1669 state->bs_rmAccess = revmap;
1672 state->bs_leader = NULL;
1673 state->bs_worker_id = 0;
1674 state->bs_sortstate = NULL;
1676 state->bs_emptyTuple = NULL;
1677 state->bs_emptyTupleLen = 0;
1681 state->bs_emptyTuple = NULL;
1682 state->bs_emptyTupleLen = 0;
1690 lastRange = ((tablePages - 1) / pagesPerRange) * pagesPerRange;
1693 state->bs_maxRangeStart = lastRange +
state->bs_pagesPerRange;
1762 state->bs_rmAccess, &phbuf,
1763 heapBlk, phtup, phsz);
1770 if (heapBlk +
state->bs_pagesPerRange > heapNumBlks)
1784 state->bs_pagesPerRange);
1789 scanNumBlks =
state->bs_pagesPerRange;
1802 state->bs_currRangeStart = heapBlk;
1804 heapBlk, scanNumBlks,
1826 heapBlk,
state->bs_dtuple, &newsize);
1830 state->bs_rmAccess, heapBlk, phbuf, offset,
1831 phtup, phsz, newtup, newsize, samepage);
1850 elog(
ERROR,
"missing placeholder tuple");
1874 bool include_partial,
double *numSummarized,
double *numExisting)
1892 startBlk = (pageRange / pagesPerRange) * pagesPerRange;
1893 heapNumBlocks =
Min(heapNumBlocks, startBlk + pagesPerRange);
1895 if (startBlk > heapNumBlocks)
1906 for (; startBlk < heapNumBlocks; startBlk += pagesPerRange)
1918 if (!include_partial &&
1919 (startBlk + pagesPerRange > heapNumBlocks))
1944 *numSummarized += 1.0;
1949 *numExisting += 1.0;
1979 &
state->bs_currentInsertBuf,
state->bs_currRangeStart,
1981 state->bs_numtuples++;
1998 if (
state->bs_dtuple->bt_empty_range)
2007 state->bs_numtuples++;
2058 if (
a->bt_empty_range)
2082 a->bt_empty_range =
false;
2168 for (blkno = 0; blkno < nblocks; blkno++)
2293 for (keyno = 0; keyno < nnullkeys; keyno++)
2334 bool isconcurrent,
int request)
2337 int scantuplesortstates;
2346 bool leaderparticipates =
true;
2349 #ifdef DISABLE_LEADER_PARTICIPATION
2350 leaderparticipates =
false;
2362 scantuplesortstates = leaderparticipates ? request + 1 : request;
2415 if (pcxt->
seg == NULL)
2482 brinleader->
pcxt = pcxt;
2484 if (leaderparticipates)
2503 if (leaderparticipates)
2764 state->bs_reltuples += reltuples;
2851 heapRel, indexRel, sortmem,
false);
2878 if (
state->bs_emptyTuple == NULL)
2887 &
state->bs_emptyTupleLen);
2894 state->bs_emptyTuple->bt_blkno = blkno;
2924 while (blkno < nextRange)
2930 &
state->bs_currentInsertBuf,
2931 blkno,
state->bs_emptyTuple,
state->bs_emptyTupleLen);
2934 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]
static void cleanup(void)
#define PARALLEL_KEY_BUFFER_USAGE
IndexBulkDeleteResult * brinvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
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)
void brininsertcleanup(IndexInfo *indexInfo)
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 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
struct BrinLeader BrinLeader
static void brin_fill_empty_ranges(BrinBuildState *state, BlockNumber prevRange, BlockNumber maxRange)
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 OidIsValid(objectId)
void ConditionVariableInit(ConditionVariable *cv)
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)
#define ItemIdGetLength(itemId)
static OffsetNumber ItemPointerGetOffsetNumber(const ItemPointerData *pointer)
static BlockNumber ItemPointerGetBlockNumber(const ItemPointerData *pointer)
Assert(fmt[strlen(fmt) - 1] !='\n')
#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
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
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)
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)