In the file backend/executor/execMain.c there are the following hook types:

/* Hooks for plugins to get control in ExecutorStart/Run/Finish/End */
ExecutorStart_hook_type ExecutorStart_hook = NULL;
ExecutorRun_hook_type ExecutorRun_hook = NULL;
ExecutorFinish_hook_type ExecutorFinish_hook = NULL;
ExecutorEnd_hook_type ExecutorEnd_hook = NULL;


It is not clear to me what every hook, or better, event is associated
to. I suspect they are:
- start => prepare resources (e.g., allocate memory and stuff)
- run
- finish => execution terminated
- end => free resources

Am I wrong?

Moreover, installing an hook is cluster-wide, right? Is there a way to
limit an hook only for connections related to a single database
(without taking into account FDW and friends)?

Thanks,
Luca


Reply via email to