Track and display estimated "work_mem" as well as limit, via EXPLAIN (work_mem on); add hook to override work_mem limits; add extension to override using "workmem.query_work_mem" GUC

Edit
ID 5595
Title Track and display estimated "work_mem" as well as limit, via EXPLAIN (work_mem on); add hook to override work_mem limits; add extension to override using "workmem.query_work_mem" GUC
CI (CFBot) Summary
Stats (from CFBot) Patch count: 4, First patch: +434−66, All patches: +3822−109
Topic Monitoring & Control
Tags
Created 2025-02-24 20:52:50
Last modified 2025-08-05 12:20:22 (1 week ago)
Latest email 2025-08-05 17:40:22 (1 week ago)
Status
PG19-2 (2025-09-01 - 2025-09-30): Needs review
2025-03 (2025-03-01 - 2025-04-08): Moved to different CF
Target version 18
Authors James Hunter (hunjmes)
Reviewers Become reviewer
Committer
Links
Emails
Proposal: "query_work_mem" GUC, to distribute working memory to the query's individual operators
First at 2025-01-10 18:00:15 by James Hunter <james.hunter.pg at gmail.com>
Latest at 2025-08-05 17:40:22 by Jeff Davis <pgsql at j-davis.com>
Latest attachment (0001-Store-working-memory-limit-per-Plan-SubPlan-rather-t.patch) at 2025-08-05 12:15:51 from Álvaro Herrera <alvherre at kurilemu.de>
    Attachment (0001-Store-working-memory-limit-per-Plan-SubPlan-rather-t.patch) at 2025-08-05 12:15:51 from Álvaro Herrera <alvherre at kurilemu.de> (Patch: Yes)
    Attachment (0002-Add-workmem-estimates-to-Path-node-and-PlannedStmt.patch) at 2025-04-07 22:36:59 from James Hunter <james.hunter.pg at gmail.com> (Patch: Yes)
    Attachment (0001-Store-working-memory-limit-per-Plan-SubPlan-rather-t.patch) at 2025-03-05 01:47:16 from James Hunter <james.hunter.pg at gmail.com> (Patch: Yes)
    Attachment (0001-Store-non-init-plan-SubPlan-objects-in-Plan-list.patch) at 2025-02-26 21:27:17 from James Hunter <james.hunter.pg at gmail.com> (Patch: Yes)
    Attachment (v03_0001-EXPLAIN-now-takes-work_mem-option-to-display-estimat.patch) at 2025-02-24 22:07:35 from James Hunter <james.hunter.pg at gmail.com> (Patch: Yes)
    Attachment (v02_0001-EXPLAIN-now-takes-work_mem-option-to-display-estimat.patch) at 2025-02-24 21:46:49 from James Hunter <james.hunter.pg at gmail.com> (Patch: Yes)
    Attachment (v01_0001-EXPLAIN-now-takes-work_mem-option-to-display-estimat.patch) at 2025-02-24 20:46:23 from James Hunter <james.hunter.pg at gmail.com> (Patch: Yes)
History
When Who What
2025-08-06 11:19:31 CFbot Patch does not need rebase anymore
2025-08-05 12:20:22 Álvaro Herrera (alvherre) New status: Needs review
2025-08-05 12:18:27 Álvaro Herrera (alvherre) Moved from CF 2025-03 to CF PG19-2
2025-08-05 12:18:10 Álvaro Herrera (alvherre) Deleted annotation "latest patch" from CAJVSvF6ckAvcFkCT-cWAqYpVn2MM5zOEiTT-ubBB4mjFfCkAWQ@mail.gmail.com
2025-08-05 12:18:06 Álvaro Herrera (alvherre) Deleted annotation "latest patch" from CAJVSvF4_Q7d+-UPTGsWTevf0K3YE0ktk7hryxFzF+mZgsRP4GA@mail.gmail.com
2025-08-05 12:18:03 Álvaro Herrera (alvherre) Deleted annotation "latest patch" from CAJVSvF63zkNJPgT=5SygMtP7dQ5ANFm0C0mhXvLr0Rh-ihtOjQ@mail.gmail.com
2025-04-01 06:52:26 vigneshwaran C (vignesh.postgres) New status: Waiting on Author
2025-03-19 05:16:43 CFbot Patch needs rebase
2025-03-05 02:02:44 CFbot Patch does not need rebase anymore
2025-03-01 05:52:36 CFbot Patch needs rebase
2025-02-26 21:28:41 James Hunter (hunjmes) Added annotation "latest patch" to CAJVSvF6ckAvcFkCT-cWAqYpVn2MM5zOEiTT-ubBB4mjFfCkAWQ@mail.gmail.com
2025-02-24 22:10:21 James Hunter (hunjmes) Added annotation "latest patch" to CAJVSvF4_Q7d+-UPTGsWTevf0K3YE0ktk7hryxFzF+mZgsRP4GA@mail.gmail.com
2025-02-24 21:51:30 James Hunter (hunjmes) Attached mail thread CAJVSvF6s1LgXF6KB2Cz68sHzk+v+O_vmwEkaon=H8O9VcOr-tQ@mail.gmail.com
2025-02-24 21:51:19 James Hunter (hunjmes) Detached mail thread CAJVSvF6s1LgXF6KB2Cz68sHzk+v+O_vmwEkaon=H8O9VcOr-tQ@mail.gmail.com
2025-02-24 21:50:02 James Hunter (hunjmes) Added annotation "latest patch" to CAJVSvF63zkNJPgT=5SygMtP7dQ5ANFm0C0mhXvLr0Rh-ihtOjQ@mail.gmail.com
2025-02-24 20:55:37 James Hunter (hunjmes) Changed name to Track and display estimated "work_mem" as well as limit, via EXPLAIN (work_mem on); add hook to override work_mem limits; add extension to override using "workmem.query_work_mem" GUC
2025-02-24 20:54:07 James Hunter (hunjmes) Changed authors to James Hunter (hunjmes)
2025-02-24 20:54:07 James Hunter (hunjmes) Changed targetversion to 18
2025-02-24 20:52:50 James Hunter (hunjmes) Attached mail thread CAJVSvF6s1LgXF6KB2Cz68sHzk+v+O_vmwEkaon=H8O9VcOr-tQ@mail.gmail.com
2025-02-24 20:52:50 James Hunter (hunjmes) Created patch record
Edit