Re: Properly pathify the union planner
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2024-03-27T10:34:09Z
Lists: pgsql-hackers
Attachments
- add_PlannerContext.patch (text/plain) patch
On Wed, 27 Mar 2024 at 22:47, David Rowley <dgrowleyml@gmail.com> wrote: > I did wonder when first working on this patch if subquery_planner() > should grow an extra parameter, or maybe consolidate some existing > ones by passing some struct that provides the planner with a bit more > context about the query. A few of the existing parameters are likely > candidates for being in such a struct. e.g. hasRecursion and > tuple_fraction. A SetOperationStmt could go in there too. The attached is roughly what I had in mind. I've not taken the time to see what comments need to be updated, so the attached aims only to assist discussion. David
Commits
-
Don't adjust ressortgroupref in generate_setop_child_grouplist()
- 7487044d6ccf 17.0 landed
-
Don't zero tuple_fraction when planning UNIONs with ORDER BYs
- 3b1a7eb28930 17.0 landed
-
Fix assert failure when planning setop subqueries with CTEs
- d5d2205c8ddc 17.0 landed
-
Allow planner to use Merge Append to efficiently implement UNION
- 66c0185a3d14 17.0 landed
-
Simplify PathKey checking code
- 0c444a70f2a7 17.0 landed
-
Clarify the 'rows' parameter in create_append_path
- 87027cb55bf7 17.0 landed