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
232 bool isconcurrent,
int request);
258 .amcanorderbyop =
false,
260 .amconsistentequality =
false,
261 .amconsistentordering =
false,
262 .amcanbackward =
false,
263 .amcanunique =
false,
264 .amcanmulticol =
true,
265 .amoptionalkey =
true,
266 .amsearcharray =
false,
267 .amsearchnulls =
true,
269 .amclusterable =
false,
270 .ampredlocks =
false,
271 .amcanparallel =
false,
272 .amcanbuildparallel =
true,
273 .amcaninclude =
false,
274 .amusemaintenanceworkmem =
false,
275 .amsummarizing =
true,
276 .amparallelvacuumoptions =
288 .amgettreeheight =
NULL,
291 .ambuildphasename =
NULL,
293 .amadjustmembers =
NULL,
301 .amestimateparallelscan =
NULL,
302 .aminitparallelscan =
NULL,
303 .amparallelrescan =
NULL,
304 .amtranslatestrategy =
NULL,
305 .amtranslatecmptype =
NULL,
378 heapBlk = (
origHeapBlk / pagesPerRange) * pagesPerRange;
415 errmsg(
"request for BRIN range summarization for index \"%s\" page %u was not recorded",
655 for (
int i = 0;
i <
bdesc->bd_tupdesc->natts;
i++)
667 memset(nkeys, 0,
sizeof(
int) *
bdesc->bd_tupdesc->natts);
671 for (
int keyno = 0; keyno < scan->
numberOfKeys; keyno++)
682 (key->sk_collation ==
773 if (
dtup->bt_placeholder)
793 for (attno = 1; attno <=
bdesc->bd_tupdesc->natts; attno++)
803 if (nkeys[attno - 1] == 0 &&
nnullkeys[attno - 1] == 0)
806 bval = &
dtup->bt_columns[attno - 1];
813 if (
dtup->bt_empty_range)
827 if (
bdesc->bd_info[attno - 1]->oi_regular_nulls &&
849 if (!nkeys[attno - 1])
852 Assert((nkeys[attno - 1] > 0) &&
879 if (consistentFn[attno - 1].fn_nargs >= 4)
902 for (keyno = 0; keyno < nkeys[attno - 1]; keyno++)
905 keys[attno - 1][keyno]->sk_collation,
930 for (pageno = heapBlk;
961 ScanKey orderbys,
int norderbys)
1018 "brinbuildCallback: completed a range: %u--%u",
1019 state->bs_currRangeStart,
1020 state->bs_currRangeStart +
state->bs_pagesPerRange));
1026 state->bs_currRangeStart +=
state->bs_pagesPerRange;
1075 "brinbuildCallbackParallel: completed a range: %u--%u",
1076 state->bs_currRangeStart,
1077 state->bs_currRangeStart +
state->bs_pagesPerRange));
1090 state->bs_currRangeStart
1120 elog(
ERROR,
"index \"%s\" already contains data",
1185 if (
state->bs_leader)
1192 state->bs_leader->nparticipanttuplesorts;
1217 state->bs_sortstate =
1254 state->bs_currRangeStart,
1255 state->bs_maxRangeStart);
1391 int save_sec_context;
1398 errmsg(
"recovery is in progress"),
1399 errhint(
"BRIN control functions cannot be executed during recovery.")));
1437 save_sec_context = -1;
1438 save_nestlevel = -1;
1448 errmsg(
"\"%s\" is not a BRIN index",
1464 errmsg(
"could not open parent table of index \"%s\"",
1468 if (indexRel->
rd_index->indisvalid)
1473 errmsg(
"index \"%s\" is not valid",
1505 errmsg(
"recovery is in progress"),
1506 errhint(
"BRIN control functions cannot be executed during recovery.")));
1537 errmsg(
"\"%s\" is not a BRIN index",
1553 errmsg(
"could not open parent table of index \"%s\"",
1557 if (indexRel->
rd_index->indisvalid)
1569 errmsg(
"index \"%s\" is not valid",
1604 for (keyno = 0; keyno < tupdesc->
natts; keyno++)
1621 bdesc->bd_context = cxt;
1622 bdesc->bd_index = rel;
1623 bdesc->bd_tupdesc = tupdesc;
1627 for (keyno = 0; keyno < tupdesc->
natts; keyno++)
1679 state->bs_numtuples = 0;
1680 state->bs_reltuples = 0;
1682 state->bs_pagesPerRange = pagesPerRange;
1683 state->bs_currRangeStart = 0;
1688 state->bs_worker_id = 0;
1692 state->bs_emptyTupleLen = 0;
1697 state->bs_emptyTupleLen = 0;
1799 state->bs_pagesPerRange);
1817 state->bs_currRangeStart = heapBlk;
1865 elog(
ERROR,
"missing placeholder tuple");
1992 state->bs_dtuple, &size);
1994 &
state->bs_currentInsertBuf,
state->bs_currRangeStart,
1996 state->bs_numtuples++;
2013 if (
state->bs_dtuple->bt_empty_range)
2017 state->bs_dtuple, &size);
2022 state->bs_numtuples++;
2073 if (
a->bt_empty_range)
2075 for (keyno = 0; keyno <
bdesc->bd_tupdesc->natts; keyno++)
2086 if (
col_b->bv_allnulls)
2097 a->bt_empty_range =
false;
2105 for (keyno = 0; keyno <
bdesc->bd_tupdesc->natts; keyno++)
2112 if (
opcinfo->oi_regular_nulls)
2119 col_a->bv_hasnulls =
true;
2122 if (
col_b->bv_allnulls)
2135 if (
col_a->bv_allnulls)
2139 col_a->bv_allnulls =
false;
2140 col_a->bv_hasnulls =
true;
2155 bdesc->bd_index->rd_indcollation[keyno],
2235 for (keyno = 0; keyno <
bdesc->bd_tupdesc->natts; keyno++)
2242 bval = &
dtup->bt_columns[keyno];
2251 has_nulls = ((!
dtup->bt_empty_range) &&
2258 if (
bdesc->bd_info[keyno]->oi_regular_nulls && nulls[keyno])
2276 idxRel->rd_indcollation[keyno],
2308 dtup->bt_empty_range =
false;
2322 for (keyno = 0; keyno <
nnullkeys; keyno++)
2324 ScanKey key = nullkeys[keyno];
2379 bool isconcurrent,
int request)
2382 int scantuplesortstates;
2394#ifdef DISABLE_LEADER_PARTICIPATION
2597 int nparticipanttuplesorts;
2599 nparticipanttuplesorts =
state->bs_leader->nparticipanttuplesorts;
2620 return state->bs_reltuples;
2678 Assert(
btup->bt_blkno %
state->bs_leader->brinshared->pagesPerRange == 0);
2744 prevblkno =
btup->bt_blkno;
2857 state->bs_reltuples += reltuples;
2947 heapRel, indexRel,
sortmem,
false);
2983 &
state->bs_emptyTupleLen);
2990 state->bs_emptyTuple->bt_blkno = blkno;
3026 &
state->bs_currentInsertBuf,
3027 blkno,
state->bs_emptyTuple,
state->bs_emptyTupleLen);
3030 blkno +=
state->bs_pagesPerRange;
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
static bool validate(Port *port, const char *auth)
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_query_id(int64 query_id, bool force)
int64 pgstat_get_my_query_id(void)
void pgstat_report_activity(BackendState state, const char *cmd_str)
#define InvalidBlockNumber
static Datum values[MAXATTR]
#define PARALLEL_KEY_BUFFER_USAGE
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)
IndexBulkDeleteResult * brinbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback, void *callback_state)
static void form_and_spill_tuple(BrinBuildState *state)
#define BRIN_ALL_BLOCKRANGES
Datum brin_summarize_new_values(PG_FUNCTION_ARGS)
IndexScanDesc brinbeginscan(Relation r, int nkeys, int norderbys)
bytea * brinoptions(Datum reloptions, bool validate)
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)
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)
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)
static void brin_fill_empty_ranges(BrinBuildState *state, BlockNumber prevRange, BlockNumber nextRange)
IndexBuildResult * brinbuild(Relation heap, Relation index, IndexInfo *indexInfo)
IndexBulkDeleteResult * brinvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
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)
BrinDesc * brin_build_desc(Relation rel)
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
static double _brin_parallel_heapscan(BrinBuildState *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, const 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)
BrinRevmap * brinRevmapInitialize(Relation idxrel, BlockNumber *pagesPerRange)
BrinTuple * brinGetTupleForHeapBlock(BrinRevmap *revmap, BlockNumber heapBlk, Buffer *buf, OffsetNumber *off, Size *size, int mode)
BrinTuple * brin_copy_tuple(BrinTuple *tuple, Size len, BrinTuple *dest, Size *destsz)
BrinTuple * brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, Size *size)
BrinMemTuple * brin_new_memtuple(BrinDesc *brdesc)
void brin_free_tuple(BrinTuple *tuple)
BrinTuple * brin_form_placeholder_tuple(BrinDesc *brdesc, BlockNumber blkno, Size *size)
BrinMemTuple * brin_memtuple_initialize(BrinMemTuple *dtuple, BrinDesc *brdesc)
BrinMemTuple * brin_deform_tuple(BrinDesc *brdesc, BrinTuple *tuple, BrinMemTuple *dMemtuple)
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)
Buffer ReadBuffer(Relation reln, BlockNumber blockNum)
#define RelationGetNumberOfBlocks(reln)
static Page BufferGetPage(Buffer buffer)
static void LockBuffer(Buffer buffer, BufferLockMode mode)
static bool BufferIsValid(Buffer bufnum)
Size PageGetFreeSpace(const PageData *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 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)
FmgrInfo * index_getprocinfo(Relation irel, AttrNumber attnum, uint16 procnum)
void index_close(Relation relation, LOCKMODE lockmode)
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)
#define AccessExclusiveLock
#define ShareUpdateExclusiveLock
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
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
static char buf[DEFAULT_XLOG_SEG_SIZE]
#define ERRCODE_UNDEFINED_TABLE
#define pgstat_count_index_scan(rel)
const char * debug_query_string
static Datum Int64GetDatum(int64 X)
static bool DatumGetBool(Datum X)
static Datum PointerGetDatum(const void *X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Pointer DatumGetPointer(Datum X)
static Datum Int32GetDatum(int32 X)
Buffer read_stream_next_buffer(ReadStream *stream, void **per_buffer_data)
ReadStream * read_stream_begin_relation(int flags, BufferAccessStrategy strategy, Relation rel, ForkNumber forknum, ReadStreamBlockNumberCB callback, void *callback_private_data, size_t per_buffer_data_size)
void read_stream_end(ReadStream *stream)
BlockNumber block_range_read_stream_cb(ReadStream *stream, void *callback_private_data, void *per_buffer_data)
#define READ_STREAM_MAINTENANCE
#define READ_STREAM_USE_BATCHING
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_allocate(shm_toc *toc, Size nbytes)
void shm_toc_insert(shm_toc *toc, uint64 key, void *address)
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)
Snapshot GetTransactionSnapshot(void)
void UnregisterSnapshot(Snapshot snapshot)
Snapshot RegisterSnapshot(Snapshot snapshot)
#define IsMVCCSnapshot(snapshot)
#define SpinLockInit(lock)
#define SpinLockRelease(lock)
#define SpinLockAcquire(lock)
BlockNumber last_exclusive
BlockNumber current_blocknum
BlockNumber bs_maxRangeStart
BlockNumber bs_pagesPerRange
Buffer bs_currentInsertBuf
Tuplesortstate * bs_sortstate
BlockNumber bs_currRangeStart
BrinTuple * bs_emptyTuple
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
BlockNumber pagesPerRange
ConditionVariable workersdonecv
BlockNumber revmapNumPages
BlockNumber pagesPerRange
struct ScanKeyData * keyData
struct IndexScanInstrumentation * instrument
BufferAccessStrategy strategy
shm_toc_estimator estimator
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, 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, 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)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int 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)
Tuplesortstate * tuplesort_begin_index_brin(int workMem, SortCoordinate coordinate, int sortopt)
BrinTuple * tuplesort_getbrintuple(Tuplesortstate *state, Size *len, bool forward)
void tuplesort_putbrintuple(Tuplesortstate *state, BrinTuple *tuple, Size size)
#define VACUUM_OPTION_PARALLEL_CLEANUP
void ExitParallelMode(void)
void EnterParallelMode(void)
bool RecoveryInProgress(void)
XLogRecPtr XLogInsert(RmgrId rmid, uint8 info)
void XLogRegisterData(const void *data, uint32 len)
XLogRecPtr log_newpage_buffer(Buffer buffer, bool page_std)
void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags)
void XLogBeginInsert(void)