mirror of https://github.com/citusdata/citus.git
only have one checkcitusversion
parent
aaf8036283
commit
14d7085379
|
@ -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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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 (!CheckExtensionVersion(WARNING))
|
if (!CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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))
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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())
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(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)
|
||||||
{
|
{
|
||||||
CheckExtensionVersion(ERROR);
|
CheckCitusVersion(ERROR);
|
||||||
|
|
||||||
Oid relationId = PG_GETARG_OID(0);
|
Oid relationId = PG_GETARG_OID(0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue