Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG
Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG
Greetings create_partial_grouping_paths() builds the UPPERREL_PARTIAL_GROUP_AGG upper relation. It already calls the FDW callback GetForeignUpperPaths there, but never calls create_upper_paths_hook, the general-purpose hook that non-FDW extensions use to add paths. UPPERREL_PARTIAL_DISTINCT doesn't have this gap: create_partial_distinct_paths() calls both GetForeignUpperPaths and create_upper_paths_hook for it. This patch adds the missing create_upper_paths_hook call right next to the existing GetForeignUpperPaths call, so a non-FDW extension can add partial aggregation paths at the same point an FDW already can, before those paths are gathered and a Finalize Aggregate is built on top. It's a small, self-contained planner change with no effect on existing plans unless an extension registers create_upper_paths_hook and adds paths at this new call site. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
Re: Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG
От:
shihao zhong <zhong950419@gmail.com>
Дата:
> It's a good idea to write something like this to convince yourself
> that the hook is usable for something useful, but that doesn't mean
> we need to carry that proof in-tree forevermore.
> that the hook is usable for something useful, but that doesn't mean
> we need to carry that proof in-tree forevermore.
You're right. The test only checks that the hook gets called. It
doesn't check that anything behaves differently, and that isn't worth
spinning up a session for. Writing it did convince me the hook is
usable, like you say, but that doesn't mean it has to stay in the tree.
Dropping 0002.
I should also correct what I wrote about it. That description was from
an different version which added a path and checked that the planner
gathered it and built Finalize Aggregate on top. Even that is existing
planner behavior, not something 0001 adds.
Review is otherwise unchanged. I only have the Nit commit message and
comment suggestions from my earlier mail.
doesn't check that anything behaves differently, and that isn't worth
spinning up a session for. Writing it did convince me the hook is
usable, like you say, but that doesn't mean it has to stay in the tree.
Dropping 0002.
I should also correct what I wrote about it. That description was from
an different version which added a path and checked that the planner
gathered it and built Finalize Aggregate on top. Even that is existing
planner behavior, not something 0001 adds.
Review is otherwise unchanged. I only have the Nit commit message and
comment suggestions from my earlier mail.
Given there is no major feedback open, I change the patch to Ready for
Committer.
Thanks,
Shihao
Re: Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
On 2026-09-08 Tu 12:25 AM, shihao zhong wrote:
> It's a good idea to write something like this to convince yourself
> that the hook is usable for something useful, but that doesn't mean
> we need to carry that proof in-tree forevermore.You're right. The test only checks that the hook gets called. It
doesn't check that anything behaves differently, and that isn't worth
spinning up a session for. Writing it did convince me the hook is
usable, like you say, but that doesn't mean it has to stay in the tree.
Dropping 0002.
I should also correct what I wrote about it. That description was from
an different version which added a path and checked that the planner
gathered it and built Finalize Aggregate on top. Even that is existing
planner behavior, not something 0001 adds.
Review is otherwise unchanged. I only have the Nit commit message and
comment suggestions from my earlier mail.Given there is no major feedback open, I change the patch to Ready forCommitter.
Thanks, I have pushed with your nits fixed.
cheers
andrew
-- Andrew Dunstan EDB: https://www.enterprisedb.com