-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/5595~1
head repository: postgresql-cfbot/postgresql
compare: cf/5595
- 5 commits
- 53 files changed
- 2 contributors
Commits on Aug 10, 2025
-
Store working memory limit per Plan/SubPlan, rather than in GUC
This commit moves the working-memory limit that an executor node checks, at runtime, from the "work_mem" and "hash_mem_multiplier" GUCs, to a new list, "workMemLimits", added to the PlannedStmt node. At runtimem an exec node checks its limit by looking up the list element corresponding to its plan->workmem_id field. Indirecting the workMemLimit via a List index allows us to handle SubPlans as well as Plans. It also allows a future extension to set limits on individual Plans/SubPlans, without needing to re-traverse the Plan + Expr tree. To preserve backward, this commit also copies the "work_mem", etc., values from the existing GUCs to the new field. This means that this commit is just a refactoring, and doesn't change any behavior. This "workmem_id" field is on the Plan node, instead of the corresponding PlanState, because the workMemLimit needs to be set before we can call ExecInitNode().
James Hunter authored and Commitfest Bot committedAug 10, 2025 Configuration menu - View commit details
-
Copy full SHA for be38214 - Browse repository at this point
Copy the full SHA be38214View commit details -
Add "workmem" estimates to Path node and PlannedStmt
To allow for future optimizers to make decisions at Path time, this commit aggregates the Path's total working memory onto the Path's "workmem" field, normalized to a minimum of 64 KB and rounded up to the next whole KB. To allow future hooks to override ExecAssignWorkMem(), this commit then breaks that total working memory into per-data structure working memory, and stores it, next to the workMemLimit, on the PlannedStmt.
James Hunter authored and Commitfest Bot committedAug 10, 2025 Configuration menu - View commit details
-
Copy full SHA for 4e75749 - Browse repository at this point
Copy the full SHA 4e75749View commit details -
Add EXPLAIN (work_mem on) command option
So that users can see how much working memory a query is likely to use, as well as how much memory it will be limited to, this commit adds an EXPLAIN (work_mem on) command option that displays the workmem estimate and limit, added in the previous two commits.
James Hunter authored and Commitfest Bot committedAug 10, 2025 Configuration menu - View commit details
-
Copy full SHA for c23115a - Browse repository at this point
Copy the full SHA c23115aView commit details -
Add "workmem_hook" to allow extensions to override per-node work_mem
James Hunter authored and Commitfest Bot committedAug 10, 2025 Configuration menu - View commit details
-
Copy full SHA for 65acdaf - Browse repository at this point
Copy the full SHA 65acdafView commit details -
[CF 5595] Track and display estimated "work_mem" as well as limit, vi…
…a EXPLAIN (work_mem on); add hook to override work_mem limits; add extension to override using "workmem.query_work_mem" GUC This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5595 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/[email protected] Author(s): James Hunter
Commitfest Bot committedAug 10, 2025 Configuration menu - View commit details
-
Copy full SHA for a0abe67 - Browse repository at this point
Copy the full SHA a0abe67View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/5595~1...cf/5595