Initialize fast planner restriction context (#4349)

We initialize fast planner restriction context so that code paths that
rely on this being not NULL will operate without a problem.
pull/4342/head
SaitTalhaNisanci 2020-11-26 13:45:27 +03:00 committed by GitHub
parent 7539454ccb
commit 83020f444e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1808,6 +1808,8 @@ FilterPlannerRestrictionForQuery(PlannerRestrictionContext *plannerRestrictionCo
/* allocate the filtered planner restriction context and set all the fields */ /* allocate the filtered planner restriction context and set all the fields */
PlannerRestrictionContext *filteredPlannerRestrictionContext = palloc0( PlannerRestrictionContext *filteredPlannerRestrictionContext = palloc0(
sizeof(PlannerRestrictionContext)); sizeof(PlannerRestrictionContext));
filteredPlannerRestrictionContext->fastPathRestrictionContext =
palloc0(sizeof(FastPathRestrictionContext));
filteredPlannerRestrictionContext->memoryContext = filteredPlannerRestrictionContext->memoryContext =
plannerRestrictionContext->memoryContext; plannerRestrictionContext->memoryContext;