mirror of https://github.com/citusdata/citus.git
Remove PG_VERSION_15 lines
parent
1cfbfbf1d6
commit
52e320977f
|
|
@ -1146,18 +1146,6 @@ columnar_vacuum_rel(Relation rel, VacuumParams *params,
|
||||||
MultiXactId multiXactCutoff;
|
MultiXactId multiXactCutoff;
|
||||||
|
|
||||||
/* initialize xids */
|
/* initialize xids */
|
||||||
#if (PG_VERSION_NUM >= PG_VERSION_15) && (PG_VERSION_NUM < PG_VERSION_16)
|
|
||||||
MultiXactId oldestMxact;
|
|
||||||
vacuum_set_xid_limits(rel,
|
|
||||||
params->freeze_min_age,
|
|
||||||
params->freeze_table_age,
|
|
||||||
params->multixact_freeze_min_age,
|
|
||||||
params->multixact_freeze_table_age,
|
|
||||||
&oldestXmin, &oldestMxact,
|
|
||||||
&freezeLimit, &multiXactCutoff);
|
|
||||||
|
|
||||||
Assert(MultiXactIdPrecedesOrEquals(multiXactCutoff, oldestMxact));
|
|
||||||
#else
|
|
||||||
TransactionId xidFullScanLimit;
|
TransactionId xidFullScanLimit;
|
||||||
MultiXactId mxactFullScanLimit;
|
MultiXactId mxactFullScanLimit;
|
||||||
vacuum_set_xid_limits(rel,
|
vacuum_set_xid_limits(rel,
|
||||||
|
|
@ -1167,7 +1155,6 @@ columnar_vacuum_rel(Relation rel, VacuumParams *params,
|
||||||
params->multixact_freeze_table_age,
|
params->multixact_freeze_table_age,
|
||||||
&oldestXmin, &freezeLimit, &xidFullScanLimit,
|
&oldestXmin, &freezeLimit, &xidFullScanLimit,
|
||||||
&multiXactCutoff, &mxactFullScanLimit);
|
&multiXactCutoff, &mxactFullScanLimit);
|
||||||
#endif
|
|
||||||
|
|
||||||
Assert(TransactionIdPrecedesOrEquals(freezeLimit, oldestXmin));
|
Assert(TransactionIdPrecedesOrEquals(freezeLimit, oldestXmin));
|
||||||
|
|
||||||
|
|
@ -1176,31 +1163,17 @@ columnar_vacuum_rel(Relation rel, VacuumParams *params,
|
||||||
* just advance to the most aggressive value.
|
* just advance to the most aggressive value.
|
||||||
*/
|
*/
|
||||||
TransactionId newRelFrozenXid = oldestXmin;
|
TransactionId newRelFrozenXid = oldestXmin;
|
||||||
#if (PG_VERSION_NUM >= PG_VERSION_15) && (PG_VERSION_NUM < PG_VERSION_16)
|
|
||||||
MultiXactId newRelminMxid = oldestMxact;
|
|
||||||
#else
|
|
||||||
MultiXactId newRelminMxid = multiXactCutoff;
|
MultiXactId newRelminMxid = multiXactCutoff;
|
||||||
#endif
|
|
||||||
|
|
||||||
double new_live_tuples = ColumnarTableTupleCount(rel);
|
double new_live_tuples = ColumnarTableTupleCount(rel);
|
||||||
|
|
||||||
/* all visible pages are always 0 */
|
/* all visible pages are always 0 */
|
||||||
BlockNumber new_rel_allvisible = 0;
|
BlockNumber new_rel_allvisible = 0;
|
||||||
|
|
||||||
#if (PG_VERSION_NUM >= PG_VERSION_15) && (PG_VERSION_NUM < PG_VERSION_16)
|
|
||||||
bool frozenxid_updated;
|
|
||||||
bool minmulti_updated;
|
|
||||||
|
|
||||||
vac_update_relstats(rel, new_rel_pages, new_live_tuples,
|
|
||||||
new_rel_allvisible, nindexes > 0,
|
|
||||||
newRelFrozenXid, newRelminMxid,
|
|
||||||
&frozenxid_updated, &minmulti_updated, false);
|
|
||||||
#else
|
|
||||||
vac_update_relstats(rel, new_rel_pages, new_live_tuples,
|
vac_update_relstats(rel, new_rel_pages, new_live_tuples,
|
||||||
new_rel_allvisible, nindexes > 0,
|
new_rel_allvisible, nindexes > 0,
|
||||||
newRelFrozenXid, newRelminMxid, false);
|
newRelFrozenXid, newRelminMxid, false);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||||
pgstat_report_vacuum(RelationGetRelid(rel),
|
pgstat_report_vacuum(RelationGetRelid(rel),
|
||||||
|
|
|
||||||
|
|
@ -2018,18 +2018,6 @@ multi_relation_restriction_hook(PlannerInfo *root, RelOptInfo *relOptInfo,
|
||||||
{
|
{
|
||||||
cacheEntry = GetCitusTableCacheEntry(rte->relid);
|
cacheEntry = GetCitusTableCacheEntry(rte->relid);
|
||||||
|
|
||||||
#if PG_VERSION_NUM == PG_VERSION_15
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Postgres 15.0 had a bug regarding inherited statistics expressions,
|
|
||||||
* which is fixed in 15.1 via Postgres commit
|
|
||||||
* 1f1865e9083625239769c26f68b9c2861b8d4b1c.
|
|
||||||
*
|
|
||||||
* Hence, we only set this value on exactly PG15.0
|
|
||||||
*/
|
|
||||||
relOptInfo->statlist = NIL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
relationRestrictionContext->allReferenceTables &=
|
relationRestrictionContext->allReferenceTables &=
|
||||||
IsCitusTableTypeCacheEntry(cacheEntry, REFERENCE_TABLE);
|
IsCitusTableTypeCacheEntry(cacheEntry, REFERENCE_TABLE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
#ifndef PG_VERSION_CONSTANTS
|
#ifndef PG_VERSION_CONSTANTS
|
||||||
#define PG_VERSION_CONSTANTS
|
#define PG_VERSION_CONSTANTS
|
||||||
|
|
||||||
#define PG_VERSION_15 150000
|
|
||||||
#define PG_VERSION_16 160000
|
#define PG_VERSION_16 160000
|
||||||
#define PG_VERSION_17 170000
|
#define PG_VERSION_17 170000
|
||||||
#define PG_VERSION_18 180000
|
#define PG_VERSION_18 180000
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue