I suppose the current definition in the higher scope is not intentional. This
is what I suggest:
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
new file mode 100644
index 9c4a1ba..ae35e1e
*** a/src/backend/optimizer/plan/planner.c
--- b/src/backend/optimizer/plan/planner.c
*************** create_ordinary_grouping_paths(PlannerIn
*** 3837,3843 ****
{
Query *parse = root->parse;
Path *cheapest_path = input_rel->cheapest_total_path;
- AggClauseCosts agg_partial_costs; /* parallel only */
AggClauseCosts agg_final_costs; /* parallel only */
double dNumGroups;
bool can_hash;
--- 3837,3842 ----
*************** create_ordinary_grouping_paths(PlannerIn
*** 3904,3909 ****
--- 3903,3909 ----
if (try_parallel_aggregation)
{
PathTarget *partial_grouping_target;
+ AggClauseCosts agg_partial_costs; /* parallel only */
/*
* Build target list for partial aggregate paths. These paths cannot
--
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26, A-2700 Wiener Neustadt
Web: https://www.cybertec-postgresql.com