| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Fire create_upper_paths_hook for UPPERREL_PARTIAL_GROUP_AGG |
| Date: | 2026-08-12 22:32:41 |
| Message-ID: | 6fc72a7d-9f52-4a72-9adf-1912da255605@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Fire-create_upper_paths_hook-for-UPPERREL_PARTIAL.patch | text/x-patch | 2.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-08-12 22:34:37 | Re: Split index and table statistics into different types of stats |
| Previous Message | Peter Smith | 2026-08-12 22:23:21 | Re: Missing list_free in publicationcmds.c:OpenTableList |