mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 14:06:20 +00:00
Merge pull request #100 from darkfronza/PG-204_save_previous_emit_log_hook
PG-204: Fix save previous emit_log_hook.
This commit is contained in:
@@ -293,9 +293,10 @@ _PG_init(void)
|
|||||||
planner_hook_next = planner_hook;
|
planner_hook_next = planner_hook;
|
||||||
planner_hook = HOOK(pgss_planner_hook);
|
planner_hook = HOOK(pgss_planner_hook);
|
||||||
#endif
|
#endif
|
||||||
emit_log_hook = HOOK(pgsm_emit_log_hook);
|
prev_emit_log_hook = emit_log_hook;
|
||||||
|
emit_log_hook = HOOK(pgsm_emit_log_hook);
|
||||||
prev_ExecutorCheckPerms_hook = ExecutorCheckPerms_hook;
|
prev_ExecutorCheckPerms_hook = ExecutorCheckPerms_hook;
|
||||||
ExecutorCheckPerms_hook = HOOK(pgss_ExecutorCheckPerms);
|
ExecutorCheckPerms_hook = HOOK(pgss_ExecutorCheckPerms);
|
||||||
|
|
||||||
nested_queryids = (uint64*) malloc(sizeof(uint64) * max_stack_depth);
|
nested_queryids = (uint64*) malloc(sizeof(uint64) * max_stack_depth);
|
||||||
|
|
||||||
@@ -317,6 +318,7 @@ _PG_fini(void)
|
|||||||
ExecutorFinish_hook = prev_ExecutorFinish;
|
ExecutorFinish_hook = prev_ExecutorFinish;
|
||||||
ExecutorEnd_hook = prev_ExecutorEnd;
|
ExecutorEnd_hook = prev_ExecutorEnd;
|
||||||
ProcessUtility_hook = prev_ProcessUtility;
|
ProcessUtility_hook = prev_ProcessUtility;
|
||||||
|
emit_log_hook = prev_emit_log_hook;
|
||||||
|
|
||||||
free(nested_queryids);
|
free(nested_queryids);
|
||||||
regfree(&preg_query_comments);
|
regfree(&preg_query_comments);
|
||||||
|
|||||||
Reference in New Issue
Block a user