↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / Configuration Parameters

enable_partitionwise_aggregate

Enables or disables the query planner's use of partitionwise grouping or aggregation, which allows grouping or aggregation on partitioned tables to be performed separately for each partition. If the GROUP BY clause does not include the partition keys, only partial aggregation can be performed on a per-partition basis, and finalization must be performed later. With this setting enabled, the number of nodes whose memory usage is restricted by work_mem appearing in the final plan can increase linearly according to the number of partitions being scanned. This can result in a large increase in overall memory consumption during the execution of the query. Query planning also becomes significantly more expensive in terms of memory and CPU. The default value is off.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

boot val
off
category
Query Tuning / Planner Method Configuration
context
user
documented
true
enumvals
Unknown
extra desc
Unknown
lang
en
max val
Unknown
metadata version
18
min val
Unknown
name
enable_partitionwise_aggregate
short desc
Enables partitionwise aggregation and grouping.
source
pg-settings-source-snapshot
unit
Unknown
vartype
bool

Definition PG 18

Enables or disables the query planner's use of partitionwise grouping or aggregation, which allows grouping or aggregation on partitioned tables to be performed separately for each partition. If the GROUP BY clause does not include the partition keys, only partial aggregation can be performed on a per-partition basis, and finalization must be performed later. With this setting enabled, the number of nodes whose memory usage is restricted by work_mem appearing in the final plan can increase linearly according to the number of partitions being scanned. This can result in a large increase in overall memory consumption during the execution of the query. Query planning also becomes significantly more expensive in terms of memory and CPU. The default value is off.

Compare versions

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · wiki-repair-20261023:dcbc2fa5f6cacfd3ffc7006c4b3385b13d5791b27af4550b85d5dd542f156a55

Text language: en · wiki-repair-20261023:dcbc2fa5f6cacfd3ffc7006c4b3385b13d5791b27af4550b85d5dd542f156a55