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 "postgres.h"
|
||||
#include "columnar/columnar_version_compat.h"
|
||||
|
||||
#include "miscadmin.h"
|
||||
|
||||
|
@ -22,6 +21,8 @@
|
|||
#include "catalog/pg_am.h"
|
||||
#include "catalog/pg_statistic.h"
|
||||
#include "commands/defrem.h"
|
||||
|
||||
#include "columnar/columnar_version_compat.h"
|
||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||
#include "commands/explain_format.h"
|
||||
#endif
|
||||
|
|
|
@ -1208,7 +1208,9 @@ columnar_vacuum_rel(Relation rel, VacuumParams *params,
|
|||
GetCurrentTimestamp()); /* start time */
|
||||
#else
|
||||
pgstat_report_vacuum(RelationGetRelid(rel),
|
||||
rel->rd_rel->relisshared);
|
||||
rel->rd_rel->relisshared,
|
||||
Max(new_live_tuples, 0),
|
||||
0);
|
||||
#endif
|
||||
|
||||
pgstat_progress_end_command();
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "commands/createas.h"
|
||||
#include "commands/dbcommands.h"
|
||||
#include "commands/explain.h"
|
||||
#include "commands/explain_format.h"
|
||||
#include "commands/tablecmds.h"
|
||||
#include "executor/tstoreReceiver.h"
|
||||
#include "lib/stringinfo.h"
|
||||
|
@ -43,12 +42,13 @@
|
|||
#include "utils/json.h"
|
||||
#include "utils/lsyscache.h"
|
||||
#include "utils/snapmgr.h"
|
||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||
# include "commands/explain_dr.h" /* CreateExplainSerializeDestReceiver() */
|
||||
#endif
|
||||
|
||||
|
||||
#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_nodefuncs.h"
|
||||
|
|
|
@ -34,15 +34,11 @@
|
|||
#include "utils/relcache.h"
|
||||
#include "utils/syscache.h"
|
||||
|
||||
/*
|
||||
* PG 18 renamed OpBtreeInterpretation to the more generic OpIndexInterpretation,
|
||||
* so make the old name an alias.
|
||||
*/
|
||||
#include "pg_version_constants.h"
|
||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||
typedef OpIndexInterpretation OpBtreeInterpretation;
|
||||
#endif
|
||||
|
||||
#include "pg_version_constants.h"
|
||||
|
||||
#include "distributed/citus_clauses.h"
|
||||
#include "distributed/colocation_utils.h"
|
||||
|
|
|
@ -84,15 +84,11 @@
|
|||
#include "utils/memutils.h"
|
||||
#include "utils/ruleutils.h"
|
||||
|
||||
/*
|
||||
* PG 18 renamed OpBtreeInterpretation to the more generic OpIndexInterpretation,
|
||||
* so make the old name an alias.
|
||||
*/
|
||||
#include "pg_version_constants.h"
|
||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||
typedef OpIndexInterpretation OpBtreeInterpretation;
|
||||
#endif
|
||||
|
||||
#include "pg_version_constants.h"
|
||||
|
||||
#include "distributed/distributed_planner.h"
|
||||
#include "distributed/listutils.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
/* for PG_VERSION_NUM and TupleDescAttr() */
|
||||
#include "postgres.h"
|
||||
|
||||
#include "access/htup_details.h"
|
||||
|
||||
|
||||
|
@ -27,9 +28,9 @@
|
|||
|
||||
/* tuple-descriptor attributes moved in PostgreSQL 18: */
|
||||
#if PG_VERSION_NUM >= PG_VERSION_18
|
||||
# define Attr(tupdesc, colno) TupleDescAttr((tupdesc), (colno))
|
||||
#define Attr(tupdesc, colno) TupleDescAttr((tupdesc), (colno))
|
||||
#else
|
||||
# define Attr(tupdesc, colno) ((tupdesc)->attrs[(colno)])
|
||||
#define Attr(tupdesc, colno) (&((tupdesc)->attrs[(colno)]))
|
||||
#endif
|
||||
|
||||
#endif /* COLUMNAR_COMPAT_H */
|
||||
|
|
Loading…
Reference in New Issue