question about executor hooks - Mailing list pgsql-hackers

From Luca Ferrari
Subject question about executor hooks
Date
Msg-id CAKoxK+4p9rj4GDFg6hPf5QucTR7uT0_S5eBTeYJXsJ6ZOJCUQw@mail.gmail.com
Whole thread Raw
Responses Re: question about executor hooks
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Reduce TupleHashEntryData struct size by half
Next
From: Alvaro Herrera
Date:
Subject: Re: downgrade some aclchk.c errors to internal