Fix `Explain Analyze` crash
We have a kind of query that its InitPlan execute in ExecutorStart. If Explain Analyze this kind of query, as well as, some memory or disk information requires to collect in the main plan, the QD will crash. Since queryDesc->showstatctx->stats_gathered is assigned to true in ExecSetParamPlan function before ExecutorRun, So we only gather Initplan metrics and left other slices information over. Segment fault when some execution node print out metrics message. To fix this problem, variable stats_gathered only be assigned after slice 0 metrics information collection. fix issue:#6951
Showing
想要评论请 注册 或 登录