mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
PG-194: PostgreSQL 13.3 and 14 support.
This commit is contained in:
@@ -126,11 +126,11 @@ static bool pgss_ExecutorCheckPerms(List *rt, bool abort);
|
|||||||
#if PG_VERSION_NUM >= 130000
|
#if PG_VERSION_NUM >= 130000
|
||||||
static PlannedStmt * pgss_planner_hook(Query *parse, const char *query_string, int cursorOptions, ParamListInfo boundParams);
|
static PlannedStmt * pgss_planner_hook(Query *parse, const char *query_string, int cursorOptions, ParamListInfo boundParams);
|
||||||
static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
||||||
|
bool readOnlyTree,
|
||||||
ProcessUtilityContext context,
|
ProcessUtilityContext context,
|
||||||
ParamListInfo params, QueryEnvironment *queryEnv,
|
ParamListInfo params, QueryEnvironment *queryEnv,
|
||||||
DestReceiver *dest,
|
DestReceiver *dest,
|
||||||
QueryCompletion *qc
|
QueryCompletion *qc);
|
||||||
);
|
|
||||||
#else
|
#else
|
||||||
static void BufferUsageAccumDiff(BufferUsage* bufusage, BufferUsage* pgBufferUsage, BufferUsage* bufusage_start);
|
static void BufferUsageAccumDiff(BufferUsage* bufusage, BufferUsage* pgBufferUsage, BufferUsage* bufusage_start);
|
||||||
static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
||||||
@@ -742,15 +742,18 @@ pgss_planner_hook(Query *parse, const char *query_string, int cursorOptions, Par
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ProcessUtility hook
|
* ProcessUtility hook
|
||||||
*/
|
*/
|
||||||
#if PG_VERSION_NUM >= 130000
|
#if PG_VERSION_NUM >= 130000
|
||||||
static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
||||||
|
bool readOnlyTree,
|
||||||
ProcessUtilityContext context,
|
ProcessUtilityContext context,
|
||||||
ParamListInfo params, QueryEnvironment *queryEnv,
|
ParamListInfo params, QueryEnvironment *queryEnv,
|
||||||
DestReceiver *dest,
|
DestReceiver *dest,
|
||||||
QueryCompletion *qc)
|
QueryCompletion *qc)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
||||||
ProcessUtilityContext context, ParamListInfo params,
|
ProcessUtilityContext context, ParamListInfo params,
|
||||||
@@ -792,26 +795,30 @@ static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
|||||||
INSTR_TIME_SET_CURRENT(start);
|
INSTR_TIME_SET_CURRENT(start);
|
||||||
PG_TRY();
|
PG_TRY();
|
||||||
{
|
{
|
||||||
|
#if PG_VERSION_NUM >= 130000
|
||||||
|
if (prev_ProcessUtility)
|
||||||
|
prev_ProcessUtility(pstmt, queryString,
|
||||||
|
readOnlyTree,
|
||||||
|
context, params, queryEnv,
|
||||||
|
dest,
|
||||||
|
qc);
|
||||||
|
else
|
||||||
|
standard_ProcessUtility(pstmt, queryString,
|
||||||
|
readOnlyTree,
|
||||||
|
context, params, queryEnv,
|
||||||
|
dest,
|
||||||
|
qc);
|
||||||
|
#else
|
||||||
if (prev_ProcessUtility)
|
if (prev_ProcessUtility)
|
||||||
prev_ProcessUtility(pstmt, queryString,
|
prev_ProcessUtility(pstmt, queryString,
|
||||||
context, params, queryEnv,
|
context, params, queryEnv,
|
||||||
dest
|
dest,
|
||||||
#if PG_VERSION_NUM >= 130000
|
completionTag);
|
||||||
,qc
|
|
||||||
#else
|
|
||||||
,completionTag
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
else
|
else
|
||||||
standard_ProcessUtility(pstmt, queryString,
|
standard_ProcessUtility(pstmt, queryString,
|
||||||
context, params, queryEnv,
|
context, params, queryEnv,
|
||||||
dest
|
dest);
|
||||||
#if PG_VERSION_NUM >= 130000
|
|
||||||
,qc
|
|
||||||
#else
|
|
||||||
,completionTag
|
|
||||||
#endif
|
#endif
|
||||||
);
|
|
||||||
}
|
}
|
||||||
PG_CATCH();
|
PG_CATCH();
|
||||||
{
|
{
|
||||||
@@ -848,25 +855,29 @@ static void pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if PG_VERSION_NUM >= 130000
|
||||||
|
if (prev_ProcessUtility)
|
||||||
|
prev_ProcessUtility(pstmt, queryString,
|
||||||
|
readOnlyTree,
|
||||||
|
context, params, queryEnv,
|
||||||
|
dest,
|
||||||
|
qc);
|
||||||
|
standard_ProcessUtility(pstmt, queryString,
|
||||||
|
readOnlyTree,
|
||||||
|
context, params, queryEnv,
|
||||||
|
dest,
|
||||||
|
qc);
|
||||||
|
#else
|
||||||
if (prev_ProcessUtility)
|
if (prev_ProcessUtility)
|
||||||
prev_ProcessUtility(pstmt, queryString,
|
prev_ProcessUtility(pstmt, queryString,
|
||||||
context, params, queryEnv,
|
context, params, queryEnv,
|
||||||
dest
|
dest,
|
||||||
#if PG_VERSION_NUM >= 130000
|
completionTag);
|
||||||
,qc
|
|
||||||
#else
|
|
||||||
,completionTag
|
|
||||||
#endif
|
|
||||||
);
|
|
||||||
standard_ProcessUtility(pstmt, queryString,
|
standard_ProcessUtility(pstmt, queryString,
|
||||||
context, params, queryEnv,
|
context, params, queryEnv,
|
||||||
dest
|
dest,
|
||||||
#if PG_VERSION_NUM >= 130000
|
completionTag);
|
||||||
,qc
|
|
||||||
#else
|
|
||||||
,completionTag
|
|
||||||
#endif
|
#endif
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user