pgsql: Fix dangling pointer in EvalPlanQual machinery.

2020-01-28 Thread Tom Lane
Fix dangling pointer in EvalPlanQual machinery. EvalPlanQualStart() supposed that it could re-use the relsubs_rowmark and relsubs_done arrays from a prior instantiation. But since they are allocated in the es_query_cxt of the recheckestate, that's just wrong; EvalPlanQualEnd() will blow away that

pgsql: Fix dangling pointer in EvalPlanQual machinery.

2020-01-28 Thread Tom Lane
Fix dangling pointer in EvalPlanQual machinery. EvalPlanQualStart() supposed that it could re-use the relsubs_rowmark and relsubs_done arrays from a prior instantiation. But since they are allocated in the es_query_cxt of the recheckestate, that's just wrong; EvalPlanQualEnd() will blow away that