mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 05:56:21 +00:00
Postgres 16 support for PGSM
* PG16 requires changes around one of the hooks, ifdef added * Meson build file added
This commit is contained in:
@@ -164,7 +164,11 @@ DECLARE_HOOK(void pgsm_ExecutorStart, QueryDesc *queryDesc, int eflags);
|
||||
DECLARE_HOOK(void pgsm_ExecutorRun, QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once);
|
||||
DECLARE_HOOK(void pgsm_ExecutorFinish, QueryDesc *queryDesc);
|
||||
DECLARE_HOOK(void pgsm_ExecutorEnd, QueryDesc *queryDesc);
|
||||
#if PG_VERSION_NUM < 160000
|
||||
DECLARE_HOOK(bool pgsm_ExecutorCheckPerms, List *rt, bool abort);
|
||||
#else
|
||||
DECLARE_HOOK(bool pgsm_ExecutorCheckPerms, List *rt, List *rp, bool abort);
|
||||
#endif
|
||||
|
||||
#if PG_VERSION_NUM >= 140000
|
||||
DECLARE_HOOK(PlannedStmt *pgsm_planner_hook, Query *parse, const char *query_string, int cursorOptions, ParamListInfo boundParams);
|
||||
@@ -783,7 +787,11 @@ pgsm_ExecutorEnd(QueryDesc *queryDesc)
|
||||
}
|
||||
|
||||
static bool
|
||||
#if PG_VERSION_NUM < 160000
|
||||
pgsm_ExecutorCheckPerms(List *rt, bool abort)
|
||||
#else
|
||||
pgsm_ExecutorCheckPerms(List *rt, List *rp, bool abort)
|
||||
#endif
|
||||
{
|
||||
ListCell *lr = NULL;
|
||||
int i = 0;
|
||||
@@ -827,7 +835,11 @@ pgsm_ExecutorCheckPerms(List *rt, bool abort)
|
||||
num_relations = i;
|
||||
|
||||
if (prev_ExecutorCheckPerms_hook)
|
||||
#if PG_VERSION_NUM < 160000
|
||||
return prev_ExecutorCheckPerms_hook(rt, abort);
|
||||
#else
|
||||
return prev_ExecutorCheckPerms_hook(rt, rp, abort);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user