Shouldn't ExecShutdownNode() be called fromstandard_ExecutorFinish()?
| От | Andres Freund |
|---|---|
| Тема | Shouldn't ExecShutdownNode() be called fromstandard_ExecutorFinish()? |
| Дата | |
| Msg-id | 20181003190321.6fy2hnao2c46qyps@alap3.anarazel.de обсуждение исходный текст |
| Ответы |
Re: Shouldn't ExecShutdownNode() be called from standard_ExecutorFinish()?
|
| Список | pgsql-hackers |
Hi,
There's a few cases where by the time ExecutorFinish() is called,
ExecShutdownNode() has not yet been called. As, among other reasons,
ExecShutdownNode() also collects instrumentation, I think that's
problematic.
In ExplainOnePlan() we call
/* run cleanup too */
ExecutorFinish(queryDesc);
and then print the majority of the explain data:
/* Create textual dump of plan tree */
ExplainPrintPlan(es, queryDesc);
and only then shut down the entire query:
ExecutorEnd(queryDesc);
which seems to mean that if a node hasn't yet been shut down for some
reason, we'll not have information that's normally collected in
ExecShutdownNode().
ISTM, we should have a new EState member that runs ExecShutdownNode() if
in standard_ExecutorEnd() if not already done.
Am I missing something?
Greetings,
Andres Freund
В списке pgsql-hackers по дате отправления: