mirror of https://github.com/citusdata/citus.git
Refactor includes and compatibility definitions for PostgreSQL 18 in columnar and distributed planner files
parent
9034028316
commit
93df6fd0bf
|
@ -13,7 +13,6 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
#include "columnar/columnar_version_compat.h"
|
|
||||||
|
|
||||||
#include "miscadmin.h"
|
#include "miscadmin.h"
|
||||||
|
|
||||||
|
@ -22,6 +21,8 @@
|
||||||
#include "catalog/pg_am.h"
|
#include "catalog/pg_am.h"
|
||||||
#include "catalog/pg_statistic.h"
|
#include "catalog/pg_statistic.h"
|
||||||
#include "commands/defrem.h"
|
#include "commands/defrem.h"
|
||||||
|
|
||||||
|
#include "columnar/columnar_version_compat.h"
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||||
#include "commands/explain_format.h"
|
#include "commands/explain_format.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1208,7 +1208,9 @@ columnar_vacuum_rel(Relation rel, VacuumParams *params,
|
||||||
GetCurrentTimestamp()); /* start time */
|
GetCurrentTimestamp()); /* start time */
|
||||||
#else
|
#else
|
||||||
pgstat_report_vacuum(RelationGetRelid(rel),
|
pgstat_report_vacuum(RelationGetRelid(rel),
|
||||||
rel->rd_rel->relisshared);
|
rel->rd_rel->relisshared,
|
||||||
|
Max(new_live_tuples, 0),
|
||||||
|
0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pgstat_progress_end_command();
|
pgstat_progress_end_command();
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "commands/createas.h"
|
#include "commands/createas.h"
|
||||||
#include "commands/dbcommands.h"
|
#include "commands/dbcommands.h"
|
||||||
#include "commands/explain.h"
|
#include "commands/explain.h"
|
||||||
#include "commands/explain_format.h"
|
|
||||||
#include "commands/tablecmds.h"
|
#include "commands/tablecmds.h"
|
||||||
#include "executor/tstoreReceiver.h"
|
#include "executor/tstoreReceiver.h"
|
||||||
#include "lib/stringinfo.h"
|
#include "lib/stringinfo.h"
|
||||||
|
@ -43,12 +42,13 @@
|
||||||
#include "utils/json.h"
|
#include "utils/json.h"
|
||||||
#include "utils/lsyscache.h"
|
#include "utils/lsyscache.h"
|
||||||
#include "utils/snapmgr.h"
|
#include "utils/snapmgr.h"
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
|
||||||
# include "commands/explain_dr.h" /* CreateExplainSerializeDestReceiver() */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#include "pg_version_constants.h"
|
#include "pg_version_constants.h"
|
||||||
|
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||||
|
#include "commands/explain_dr.h" /* CreateExplainSerializeDestReceiver() */
|
||||||
|
#include "commands/explain_format.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "distributed/citus_depended_object.h"
|
#include "distributed/citus_depended_object.h"
|
||||||
#include "distributed/citus_nodefuncs.h"
|
#include "distributed/citus_nodefuncs.h"
|
||||||
|
|
|
@ -34,15 +34,11 @@
|
||||||
#include "utils/relcache.h"
|
#include "utils/relcache.h"
|
||||||
#include "utils/syscache.h"
|
#include "utils/syscache.h"
|
||||||
|
|
||||||
/*
|
#include "pg_version_constants.h"
|
||||||
* PG 18 renamed OpBtreeInterpretation to the more generic OpIndexInterpretation,
|
|
||||||
* so make the old name an alias.
|
|
||||||
*/
|
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||||
typedef OpIndexInterpretation OpBtreeInterpretation;
|
typedef OpIndexInterpretation OpBtreeInterpretation;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "pg_version_constants.h"
|
|
||||||
|
|
||||||
#include "distributed/citus_clauses.h"
|
#include "distributed/citus_clauses.h"
|
||||||
#include "distributed/colocation_utils.h"
|
#include "distributed/colocation_utils.h"
|
||||||
|
|
|
@ -84,15 +84,11 @@
|
||||||
#include "utils/memutils.h"
|
#include "utils/memutils.h"
|
||||||
#include "utils/ruleutils.h"
|
#include "utils/ruleutils.h"
|
||||||
|
|
||||||
/*
|
#include "pg_version_constants.h"
|
||||||
* PG 18 renamed OpBtreeInterpretation to the more generic OpIndexInterpretation,
|
|
||||||
* so make the old name an alias.
|
|
||||||
*/
|
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||||
typedef OpIndexInterpretation OpBtreeInterpretation;
|
typedef OpIndexInterpretation OpBtreeInterpretation;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "pg_version_constants.h"
|
|
||||||
|
|
||||||
#include "distributed/distributed_planner.h"
|
#include "distributed/distributed_planner.h"
|
||||||
#include "distributed/listutils.h"
|
#include "distributed/listutils.h"
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
/* for PG_VERSION_NUM and TupleDescAttr() */
|
/* for PG_VERSION_NUM and TupleDescAttr() */
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
#include "access/htup_details.h"
|
#include "access/htup_details.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +30,7 @@
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||||
#define Attr(tupdesc, colno) TupleDescAttr((tupdesc), (colno))
|
#define Attr(tupdesc, colno) TupleDescAttr((tupdesc), (colno))
|
||||||
#else
|
#else
|
||||||
# define Attr(tupdesc, colno) ((tupdesc)->attrs[(colno)])
|
#define Attr(tupdesc, colno) (&((tupdesc)->attrs[(colno)]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* COLUMNAR_COMPAT_H */
|
#endif /* COLUMNAR_COMPAT_H */
|
||||||
|
|
Loading…
Reference in New Issue