mirror of https://github.com/citusdata/citus.git
Introduce ExplainOnePlanCompat
Since ExplainOnePlan expects BufferUsage as well with PG >= 13, ExplainOnePlanCompat is added. Commit on Postgres side: ed7a5095716ee498ecc406e1b8d5ab92c7662d10pull/3900/head
parent
6314eba5df
commit
688ab16bba
|
@ -313,7 +313,7 @@ ExplainSubPlans(DistributedPlan *distributedPlan, ExplainState *es)
|
||||||
|
|
||||||
INSTR_TIME_SET_ZERO(planduration);
|
INSTR_TIME_SET_ZERO(planduration);
|
||||||
|
|
||||||
ExplainOnePlan(plan, into, es, queryString, params, NULL, &planduration);
|
ExplainOnePlanCompat(plan, into, es, queryString, params, NULL, &planduration, NULL);
|
||||||
|
|
||||||
if (es->format == EXPLAIN_FORMAT_TEXT)
|
if (es->format == EXPLAIN_FORMAT_TEXT)
|
||||||
{
|
{
|
||||||
|
@ -1463,8 +1463,8 @@ ExplainOneQuery(Query *query, int cursorOptions,
|
||||||
INSTR_TIME_SUBTRACT(planduration, planstart);
|
INSTR_TIME_SUBTRACT(planduration, planstart);
|
||||||
|
|
||||||
/* run it (if needed) and produce output */
|
/* run it (if needed) and produce output */
|
||||||
ExplainOnePlan(plan, into, es, queryString, params, queryEnv,
|
ExplainOnePlanCompat(plan, into, es, queryString, params, queryEnv,
|
||||||
&planduration);
|
&planduration, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#define standard_planner_compat(a,b,c,d) standard_planner(a,b,c,d)
|
#define standard_planner_compat(a,b,c,d) standard_planner(a,b,c,d)
|
||||||
#define PortalDefineQuerySelectCompat(a,b,c,e,f) PortalDefineQuery(a,b,c,CMDTAG_SELECT,e,f)
|
#define PortalDefineQuerySelectCompat(a,b,c,e,f) PortalDefineQuery(a,b,c,CMDTAG_SELECT,e,f)
|
||||||
#define getOwnedSequencesCompat(a,b) getOwnedSequences(a)
|
#define getOwnedSequencesCompat(a,b) getOwnedSequences(a)
|
||||||
|
#define ExplainOnePlanCompat(a,b,c,d,e,f,g,h) ExplainOnePlan(a,b,c,d,e,f,g,h)
|
||||||
#else /* pre PG13 */
|
#else /* pre PG13 */
|
||||||
#define lnext_compat(l, r) lnext(r)
|
#define lnext_compat(l, r) lnext(r)
|
||||||
#define list_delete_cell_compat(l,c,p) list_delete_cell(l,c,p)
|
#define list_delete_cell_compat(l,c,p) list_delete_cell(l,c,p)
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
#define standard_planner_compat(a,b,c,d) standard_planner(a,c,d)
|
#define standard_planner_compat(a,b,c,d) standard_planner(a,c,d)
|
||||||
#define PortalDefineQuerySelectCompat(a,b,c,e,f) PortalDefineQuery(a,b,c,"SELECT",e,f)
|
#define PortalDefineQuerySelectCompat(a,b,c,e,f) PortalDefineQuery(a,b,c,"SELECT",e,f)
|
||||||
#define getOwnedSequencesCompat(a,b) getOwnedSequences(a,b)
|
#define getOwnedSequencesCompat(a,b) getOwnedSequences(a,b)
|
||||||
|
#define ExplainOnePlanCompat(a,b,c,d,e,f,g,h) ExplainOnePlan(a,b,c,d,e,f,g)
|
||||||
#endif
|
#endif
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_12
|
#if PG_VERSION_NUM >= PG_VERSION_12
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue