Summary:
Given YB aggregate pushdown is currently disabled for partitioned table
scans when enable_partitionwise_aggregate is false, set the default to
true. The performance boost of aggregate pushdown far outweighs the
potential downsides of partitionwise aggregation, which according to
PostgreSQL documentation, reads as follows
> 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.
Update regress tests in response:
- yb.port.partition_join: The partition_join regress test manipulates
the enable_partitionwise_aggregate in a way that clearly expects it to
be false by default. Add explicit settings to false in the ported
test to restore the original behavior.
- yb.port.aggregates: Similarly add explicit settings to false.
- yb.port.partiiton_prune: Similarly add explicit settings to false.
- yb.orig.select_parallel: Update output to use pushdown. This change
does not appear to conflict with the original author's intent.
- pg_hint_plan init: Update simple output that shows default GUC values.
Test coverage for partitionwise aggregate pushdown has already been
added by commit 9a4a54f2782c1417539e05ca5f76de04d6700e1b.
Jira: DB-14395
Test Plan:
jenkins
Backport-through: 2025.1
Reviewers: aagrawal, amartsinchyk
Reviewed By: aagrawal, amartsinchyk
Subscribers: yql
Differential Revision: https://phorge.dev.yugabyte.com/D44253