Move memoryAccountId out of PlannedStmt/Plan Nodes
Functions using SQL and PL/pgSQL will plan and execute arbitrary SQL
inside a running query. The first time we initialize a plan for an SQL
block, the memory accounting system creates a new memory account for
each Executor/Node. In the case that we are executing a cached plan,
(i.e. plancache.c) the memory accounts will have already been assigned
in a previous execution of the plan.
As a result, when explain_memory_verbosity is set to 'detail', it is not
clear what memory account corresponds to which executor. Instead, move
the memoryAccountId into PlanState/QueryDesc, which will insure that
every time we initialize an executor, it will be assigned a unique
memoryAccountId.
Co-authored-by: NMelanie Plageman <mplageman@pivotal.io>
Showing
想要评论请 注册 或 登录