added calls

pull/5712/head
yxu2162 2022-02-15 12:49:25 -08:00
parent f84a999a4b
commit aaf8036283
1 changed files with 19 additions and 19 deletions

View File

@ -118,7 +118,7 @@ static bool CitusHasBeenLoadedColumnar(void);
static bool CheckExtensionVersion(int elevel); static bool CheckExtensionVersion(int elevel);
static bool MajorVersionsCompatibleColumnar(char *leftVersion, char *rightVersion); static bool MajorVersionsCompatibleColumnar(char *leftVersion, char *rightVersion);
/* global variables for CheckCitusVersion */ /* global variables for CheckExtensionVersion */
static bool extensionLoadedColumnar = false; static bool extensionLoadedColumnar = false;
static bool EnableVersionChecksColumnar = true; static bool EnableVersionChecksColumnar = true;
static bool citusVersionKnownCompatibleColumnar = false; static bool citusVersionKnownCompatibleColumnar = false;
@ -434,7 +434,7 @@ columnar_parallelscan_reinitialize(Relation rel, ParallelTableScanDesc pscan)
static IndexFetchTableData * static IndexFetchTableData *
columnar_index_fetch_begin(Relation rel) columnar_index_fetch_begin(Relation rel)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
Oid relfilenode = rel->rd_node.relNode; Oid relfilenode = rel->rd_node.relNode;
if (PendingWritesInUpperTransactions(relfilenode, GetCurrentSubTransactionId())) if (PendingWritesInUpperTransactions(relfilenode, GetCurrentSubTransactionId()))
@ -659,7 +659,7 @@ static bool
columnar_tuple_satisfies_snapshot(Relation rel, TupleTableSlot *slot, columnar_tuple_satisfies_snapshot(Relation rel, TupleTableSlot *slot,
Snapshot snapshot) Snapshot snapshot)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
uint64 rowNumber = tid_to_row_number(slot->tts_tid); uint64 rowNumber = tid_to_row_number(slot->tts_tid);
StripeMetadata *stripeMetadata = FindStripeByRowNumber(rel, rowNumber, snapshot); StripeMetadata *stripeMetadata = FindStripeByRowNumber(rel, rowNumber, snapshot);
@ -672,7 +672,7 @@ static TransactionId
columnar_index_delete_tuples(Relation rel, columnar_index_delete_tuples(Relation rel,
TM_IndexDeleteOp *delstate) TM_IndexDeleteOp *delstate)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
/* /*
* XXX: We didn't bother implementing index_delete_tuple for neither of * XXX: We didn't bother implementing index_delete_tuple for neither of
@ -733,7 +733,7 @@ static void
columnar_tuple_insert(Relation relation, TupleTableSlot *slot, CommandId cid, columnar_tuple_insert(Relation relation, TupleTableSlot *slot, CommandId cid,
int options, BulkInsertState bistate) int options, BulkInsertState bistate)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
/* /*
* columnar_init_write_state allocates the write state in a longer * columnar_init_write_state allocates the write state in a longer
@ -781,7 +781,7 @@ static void
columnar_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples, columnar_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples,
CommandId cid, int options, BulkInsertState bistate) CommandId cid, int options, BulkInsertState bistate)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
ColumnarWriteState *writeState = columnar_init_write_state(relation, ColumnarWriteState *writeState = columnar_init_write_state(relation,
RelationGetDescr(relation), RelationGetDescr(relation),
@ -857,7 +857,7 @@ columnar_relation_set_new_filenode(Relation rel,
TransactionId *freezeXid, TransactionId *freezeXid,
MultiXactId *minmulti) MultiXactId *minmulti)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
if (persistence == RELPERSISTENCE_UNLOGGED) if (persistence == RELPERSISTENCE_UNLOGGED)
{ {
@ -894,7 +894,7 @@ columnar_relation_set_new_filenode(Relation rel,
static void static void
columnar_relation_nontransactional_truncate(Relation rel) columnar_relation_nontransactional_truncate(Relation rel)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
RelFileNode relfilenode = rel->rd_node; RelFileNode relfilenode = rel->rd_node;
@ -942,7 +942,7 @@ columnar_relation_copy_for_cluster(Relation OldHeap, Relation NewHeap,
double *tups_vacuumed, double *tups_vacuumed,
double *tups_recently_dead) double *tups_recently_dead)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
TupleDesc sourceDesc = RelationGetDescr(OldHeap); TupleDesc sourceDesc = RelationGetDescr(OldHeap);
TupleDesc targetDesc = RelationGetDescr(NewHeap); TupleDesc targetDesc = RelationGetDescr(NewHeap);
@ -1040,7 +1040,7 @@ static void
columnar_vacuum_rel(Relation rel, VacuumParams *params, columnar_vacuum_rel(Relation rel, VacuumParams *params,
BufferAccessStrategy bstrategy) BufferAccessStrategy bstrategy)
{ {
if (!CheckCitusVersion(WARNING)) if (!CheckExtensionVersion(WARNING))
{ {
/* /*
* Skip if the extension catalogs are not up-to-date, but avoid * Skip if the extension catalogs are not up-to-date, but avoid
@ -1358,7 +1358,7 @@ columnar_index_build_range_scan(Relation columnarRelation,
void *callback_state, void *callback_state,
TableScanDesc scan) TableScanDesc scan)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
if (start_blockno != 0 || numblocks != InvalidBlockNumber) if (start_blockno != 0 || numblocks != InvalidBlockNumber)
{ {
@ -1608,7 +1608,7 @@ columnar_index_validate_scan(Relation columnarRelation,
ValidateIndexState * ValidateIndexState *
validateIndexState) validateIndexState)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
ColumnarReportTotalVirtualBlocks(columnarRelation, snapshot, ColumnarReportTotalVirtualBlocks(columnarRelation, snapshot,
PROGRESS_SCAN_BLOCKS_TOTAL); PROGRESS_SCAN_BLOCKS_TOTAL);
@ -1780,7 +1780,7 @@ TupleSortSkipSmallerItemPointers(Tuplesortstate *tupleSort, ItemPointer targetIt
static uint64 static uint64
columnar_relation_size(Relation rel, ForkNumber forkNumber) columnar_relation_size(Relation rel, ForkNumber forkNumber)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
uint64 nblocks = 0; uint64 nblocks = 0;
@ -1807,7 +1807,7 @@ columnar_relation_size(Relation rel, ForkNumber forkNumber)
static bool static bool
columnar_relation_needs_toast_table(Relation rel) columnar_relation_needs_toast_table(Relation rel)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
return false; return false;
} }
@ -1818,7 +1818,7 @@ columnar_estimate_rel_size(Relation rel, int32 *attr_widths,
BlockNumber *pages, double *tuples, BlockNumber *pages, double *tuples,
double *allvisfrac) double *allvisfrac)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
RelationOpenSmgr(rel); RelationOpenSmgr(rel);
*pages = smgrnblocks(rel->rd_smgr, MAIN_FORKNUM); *pages = smgrnblocks(rel->rd_smgr, MAIN_FORKNUM);
@ -1984,7 +1984,7 @@ ColumnarTableDropHook(Oid relid)
if (IsColumnarTableAmTable(relid)) if (IsColumnarTableAmTable(relid))
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
/* /*
* Drop metadata. No need to drop storage here since for * Drop metadata. No need to drop storage here since for
@ -2109,7 +2109,7 @@ ColumnarProcessUtility(PlannedStmt *pstmt,
if (rel->rd_tableam == GetColumnarTableAmRoutine()) if (rel->rd_tableam == GetColumnarTableAmRoutine())
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
if (!ColumnarSupportsIndexAM(indexStmt->accessMethod)) if (!ColumnarSupportsIndexAM(indexStmt->accessMethod))
{ {
@ -2332,7 +2332,7 @@ PG_FUNCTION_INFO_V1(alter_columnar_table_set);
Datum Datum
alter_columnar_table_set(PG_FUNCTION_ARGS) alter_columnar_table_set(PG_FUNCTION_ARGS)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
Oid relationId = PG_GETARG_OID(0); Oid relationId = PG_GETARG_OID(0);
@ -2456,7 +2456,7 @@ PG_FUNCTION_INFO_V1(alter_columnar_table_reset);
Datum Datum
alter_columnar_table_reset(PG_FUNCTION_ARGS) alter_columnar_table_reset(PG_FUNCTION_ARGS)
{ {
CheckCitusVersion(ERROR); CheckExtensionVersion(ERROR);
Oid relationId = PG_GETARG_OID(0); Oid relationId = PG_GETARG_OID(0);