Partitionwise aggregate and runtime partition pruning - Mailing list pgsql-general

From Michał Kłeczek
Subject Partitionwise aggregate and runtime partition pruning
Date
Msg-id F54D9FEE-0A39-490A-801F-B2858B527D01@kleczek.org
Whole thread Raw
List pgsql-general
Hi All,

I have a question about partition pruning.

Does runtime partition pruning (ie. pruning performed during execution) work with partition wise aggregates?

1) I have a setup with a mix of foreign (postgres_fdw) and local partitions.
2) I want to perform an aggregate query and I want the aggregates to be pushed down to remote servers.

To make it possible I set enable_partitionwise_aggregate to on.

My observation is that partition pruning works during planning time
But with plan_cache_mode = force_generic_plan, explain analyse execute prepared_stmt(params) shows that
_all_ partitions are scanned (and queries sent to remote severs for all remote partitions).

When I set enable_hashagg to false runtime partition pruning works but no pushdown is taking place.

Am I missing something or runtime partition pruning is not going to work for generic plans and partitionwise
aggregates?

Thanks,
Michal




pgsql-general by date:

Previous
From: Muhammad Usman Khan
Date:
Subject: Re: MError after replication in postgresql
Next
From: yudhi s
Date:
Subject: Suggestion for memory parameters