enable_partitionwise_aggregate
No restart — settable per sessiontuned by pgconfiguratorboolean (on/off)
Lets the planner aggregate each partition separately, then combine.
What pgconfigurator would set
32 GB · 8 vCPU · NVMe · OLTP
Computing…
Tune for your exact server → /tunecomputed in your browser · nothing uploaded
What it does
When grouping aligns with the partition key, this lets the planner compute the aggregate within each partition and then merge the partial results, instead of funneling every row through one big aggregate. It shrinks per-step work and parallelizes well across partitions.
How to tune it
Off by default for the same reason as partitionwise join — extra planning cost. Enable it for analytical GROUP BY queries over partitioned tables where the grouping keys line up with partitioning. Pair it with partitionwise join for partitioned star-schema style queries.