=?UTF-8?Q?Erik_Nordstr=C3=B6m?= <e...@timescale.com> writes: > I noticed that, beginning with PG16, grouped aggregates are missing the > "Group Key" in the EXPLAIN output.
> It seems the Agg node has numCols (number of grouping cols) set to zero in > queries like > SELECT foo, count(*) FROM bar WHERE foo=1 GROUP BY foo; > In PG15, the "Group Key" is shown and the Agg node has numCols set as > expected. Looks sane to me: the planner now notices that there can only be one group so it doesn't tell the GroupAgg node to worry about making groups. If it were missing in a case where there could be multiple output groups, yes that'd be a bug. If you want to run it to ground you could bisect to see where the behavior changed, but you'd probably just find it was intentional. regards, tom lane